[Issue 10413] .init incorrectly accepts any expression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 25 23:58:06 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10413



--- Comment #1 from Don <clugdbug at yahoo.com.au> 2013-06-25 23:57:58 PDT ---
Pull request:
https://github.com/D-Programming-Language/dmd/pull/2240

This fails Phobos unit tests in multiple places, for example:

std/traits.d(3654): Error: static assert  (is(void == double)) is false

With constructions like:
template Foo(T...)

     T[0].init
is OK if T[0] is a type, but if it is a value, it won't compile.
It is in fact pretty bizarre that 2.init == 0, so this should probably be
changed.

-- 
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