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; }
Comment #1 by k.hara.pg — 2012-12-18T04:41:27Z
Comment #2 by github-bugzilla — 2012-12-18T05:55:45Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bfb90a4a51c9499152382fd1ed974ec34dfb30ab fix Issue 9176 - Incorrect gagging of fwdref error in alias this semantics https://github.com/D-Programming-Language/dmd/commit/a739c13caa662eba6c8bc2493c41368068541f02 Merge pull request #1384 from 9rnsr/fix8556 Fixup pull#1380, and fix Issue 9176 - Incorrect gagging of fwdref error in alias this semantics