[Issue 13860] New: template required forward reference for typeof(member)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Dec 14 00:42:45 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13860
Issue ID: 13860
Summary: template required forward reference for typeof(member)
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: major
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: vlevenfeld at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list