Skip to content

Commit 52d164a

Browse files
authored
Merge pull request #1105 from diffblue/cast_to_real4
KNOWNBUG test for implict cast from `real` to `int`
2 parents b9b7133 + 59345e3 commit 52d164a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
KNOWNBUG
2+
cast_from_real2.sv
3+
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
--
9+
The implicit cast is currently not allowed.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module main;
2+
3+
int a, b, c, d;
4+
5+
// implicit casting as part of an assignment
6+
initial begin
7+
a = 0.0;
8+
assert(a == 0);
9+
b = 1.0;
10+
assert(b == 1);
11+
c = 0.5;
12+
assert(c == 1);
13+
d = -0.5;
14+
assert(d == -1);
15+
end
16+
17+
endmodule

0 commit comments

Comments
 (0)