Forward Reference Error in unittests

MoonlightSentinel moonlightsentinel at disroot.org
Tue Dec 3 11:31:40 UTC 2019


On Tuesday, 3 December 2019 at 10:30:34 UTC, mipri wrote:

> Likewise this fails, but would succeed if foo were moved
> out of the unit test:
>
> unittest {
>     void foo(int x) { writeln(x); }
>
>     42.foo;
> }

Not a forward reference error, local symbols are excluded from 
UFCS (see https://dlang.org/spec/function.html#pseudo-member)


More information about the Digitalmars-d mailing list