[Issue 14430] Null parameter is detected as non-null.
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Apr 9 11:27:32 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14430
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |ag0aep6g at gmail.com
Severity|major |regression
--- Comment #2 from ag0aep6g at gmail.com ---
Reduced:
----
void setCookie(long x = 1L << 32L, string y = null){
assert(b.ptr is null);
}
void main(){
setCookie();
}
----
Fails when x's default value has all zero lower 32 bits, but not all zero
higher 32 bits. y.ptr then has the value of x.
Works correctly with v2.059. Fails since v2.060.
--
More information about the Digitalmars-d-bugs
mailing list