[Issue 16484] New: Overloaded empty funcs trigger AssertError: "Called `get' on null Nullable"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Sep 9 11:31:06 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16484
Issue ID: 16484
Summary: Overloaded empty funcs trigger AssertError: "Called
`get' on null Nullable"
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: cbkbbejeap at mailinator.com
-----------------------------------
$ cat test.d
import std.typecons;
void foo(T)(Nullable!T value)
{ }
void foo()(int i)
{ }
void main()
{
Nullable!int x;
foo(x);
}
$ dmd -run test.d
core.exception.AssertError@/home/nick/.dvm/compilers/dmd-2.071.1/linux/bin/../../src/phobos/std/typecons.d(2075):
Called `get' on null Nullable!int.
-----------------------------------
WTF?!?!?
Removing the "int" overload makes the error go away.
--
More information about the Digitalmars-d-bugs
mailing list