This is the CTFE problem on out of function scope.
struct G {}
struct F(T) { void f(ref T) {} }
pragma(msg, F!G().f(G.init)); // ICE
enum b = { F!G().f(G.init); return true; }(); // OK
void main()
{
F!G().f(G.init); // OK
}
Comment #2 by clugdbug — 2012-09-26T00:45:55Z
Before CTFE begins, the code in comment 1 is translated into:
F().f((G __tmpsl5 = G(); , __tmpsl5))
The problem is that the comma expression is evaluated outside of CTFE.
This would be fixed by bug 7988.
Comment #3 by bugzilla — 2013-10-06T23:21:23Z
I get the following message from 2.064 head:
test.d(3): Error: function test.F!(G).F.f (ref G _param_0) is not callable using argument types (G)
test.d(3): while evaluating pragma(msg, F().f(G()))
No ice.
Comment #4 by github-bugzilla — 2013-11-16T00:59:38Z