[Issue 16484] regression(2.064) Overloaded empty funcs trigger AssertError: "Called `get' on null Nullable"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Oct 13 22:25:55 PDT 2016


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

--- Comment #5 from ag0aep6g at gmail.com ---
(In reply to Walter Bright from comment #3)
> (In reply to ag0aep6g from comment #2)
> > void foo(T)(Nullable!T value) {}
> 
> Considered:
>     "match with conversion for initial template arguments"

Here "with conversion" means that it needs template argument inference, right?

>     "exact match for inferred template arguments"
> 
> > void foo()(int i) { assert(false); /* hit */ }
> 
> Considered:
>    "exact match for initial template arguments"
>    "exact match for inferred template arguments"

But this one is not an exact match. It involves an `alias this` conversion from
Nullable!int to int.

As far as I can tell, it should be:
  "match with conversion for initial template arguments"
  "match with conversion for inferred template arguments"

Or maybe just "match with conversion" since there are no template parameters.
The empty template parentheses can actually be omitted without changing the
behavior of the code.

--


More information about the Digitalmars-d-bugs mailing list