[Bug 187] New: two errors meaning the same thing from assert(false, 1)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 9 01:31:26 PDT 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=187
Summary: two errors meaning the same thing from assert(false, 1)
Product: D
Version: 0.160
Platform: PC
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: braddr at puremagic.com
82 try
83 {
84 assert(false, 1);
85 }
86 catch (AssertError e)
87 {
88 writefln("message", e.message);
89 }
assert-test.d:84: cannot implicitly convert expression (1) of type int to
char[]
assert-test.d:84: cannot cast int to char[]
Interestingly, a similar test only produces a single warning:
91 int test7func() { return 1; }
92 try
93 {
94 assert(false, test7func());
95 writefln("test 7 failed -- it didn't throw when it should
have");
96 }
97 catch (AssertError e)
98 {
99 //writefln("test 7 assert msg: %s", e.message);
100 }
assert-test.d:94: cannot implicitly convert expression ((test7func)()) of type
int to char[]
--
More information about the Digitalmars-d-bugs
mailing list