Bug 13860 – template required forward reference for typeof(member)
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-14T08:42:00Z
Last change time
2015-06-17T21:03:34Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
vlevenfeld
Comments
Comment #0 by vlevenfeld — 2014-12-14T08:42:45Z
struct Foo (Bar...)
{
Bar bars;
auto baz (size_t d)(){}
pragma(msg, typeof(baz!0)); // line A
}
auto bar (S,R)(S, R)
{pragma(msg, typeof(Foo!().baz!0));} // line B
void main ()
{/*...}*/
int[] x;
int[] y;
x.bar (y);
}
if line A is not commented out:
Error: Foo!().Foo no size yet for forward reference
line B displays the expected output.