Bug 9176 – Incorrect gagging of fwdref error in alias this semantics
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-18T03:28:00Z
Last change time
2012-12-18T08:23:12Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0 by k.hara.pg — 2012-12-18T03:28:21Z
This code prints `false` in compile time. But dmd does not report a forward reference error in S.get, and compilation itself *wrongly* succeeds.
void foo(int x) {}
pragma(msg, is(typeof(foo(S()))));
struct S {
auto get() { return get(); }
alias get this;
}