[Issue 14093] [REG2.065] __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile.

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 5 20:51:59 PST 2015


https://issues.dlang.org/show_bug.cgi?id=14093

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
The error:

foo2.d(8): Error: e2ir: cannot cast __tup1850.__expand_field_0 of type int to
type object.Object
foo2.d(8): Error: e2ir: cannot cast __tup1850.__expand_field_1 of type int to
type object.Object

is coming from the glue layer. The __traits(compiles, ) does not get that far.
The error check needs to be moved up into the front end to fix it.

--


More information about the Digitalmars-d-bugs mailing list