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

Ivan Kazmenko <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Ivan Kazmenko <[email protected]> ---
Still does not work in 2.080 release.
The error message however is interesting.
Here is a modified example with a line containing `(a)` instead of `a`.
Compile with `dmd -main`:

-----
import std.algorithm;
enum test(alias fun) = "it works";
immutable a = [1,2,3];

pragma(msg, typeof(a));               // immutable(int[])
pragma(msg, test!((a).map!(x => x))); // "it works"
pragma(msg, test!(a.map!(x => x)));   // template identifier `map` is not a
member of variable `a.a`
-----

Why is that `a.a` in the first place?
Does the compiler mistake `a` for an eponymous template somehow, instead of
seeing that `map` is a template here?

--

Reply via email to