[Issue 1403] New: Incorrect scope in unit test
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 5 00:51:01 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1403
Summary: Incorrect scope in unit test
Product: D
Version: 2.003
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: accepts-invalid, rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: reiner.pope at gmail.com
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.
--
More information about the Digitalmars-d-bugs
mailing list