[Issue 3903] New: Traits compiles as true for an array sum with wrong syntax
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 8 15:04:08 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3903
Summary: Traits compiles as true for an array sum with wrong
syntax
Product: D
Version: 2.041
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-03-08 15:04:06 PST ---
This compiles, but the traits has to return 'false' here:
void main() {
int[2] a = [1, 2];
assert( __traits(compiles, {return a + a;}) );
//auto r = a + a; // error
}
See also bug 3817 .
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list