Bug 1403 – Incorrect scope in unit test

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2007-08-05T02:51:00Z
Last change time
2015-06-09T05:11:40Z
Keywords
accepts-invalid, rejects-valid
Assigned to
nobody
Creator
reiner.pope

Comments

Comment #0 by reiner.pope — 2007-08-05T02:51:00Z
As desired, the following code fails to compile: unittest { interface Foo { int a(); } } unittest { Foo f; f.a(); } However, the following code *does* compile: unittest { interface Foo { int a(); } } unittest { interface Foo { int b(); } Foo f; f.a(); // we have the wrong Foo here } and if f.a() is changed to f.b(), it doesn't compile.
Comment #1 by yebblies — 2012-01-29T19:41:44Z
Works with current dmd (2.058 & 1.068)
Comment #2 by yebblies — 2012-01-29T19:45:54Z
Wait a sec, Reiner Pope? Did we go to the same highschool?