digitalmars.D.bugs - [Issue 16484] New: Overloaded empty funcs trigger AssertError:
- via Digitalmars-d-bugs (33/33) Sep 09 2016 https://issues.dlang.org/show_bug.cgi?id=16484
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 puremagic.com Reporter: cbkbbejeap 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. --
Sep 09 2016