[Issue 2700] New: typeof tests stops compilation abruptly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 1 15:14:01 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2700
Summary: typeof tests stops compilation abruptly
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
bool endsWith(A1, A2)(A1 longer, A2 shorter)
{
static if (is(typeof(longer[0 .. 0] == shorter)))
{
}
else
{
}
return false;
}
void main()
{
char[] a;
byte[] b;
endsWith(a, b);
}
Attempting to compile yields:
Error: array equality comparison type mismatch, char[] vs byte[]
There is no line number, which makes the bug particularly jarring (IMHO: if a
compilation error comes with no line number that can be used in tracking the
error, that bug should be automatically considered major.)
--
More information about the Digitalmars-d-bugs
mailing list