digitalmars.D.bugs - package attribute is broken when overriding
- Vathix (18/18) Sep 12 2004 class Foo
class Foo
{
package void hi() { printf("Foo.hi()\n"); }
}
class Bar: Foo
{
void hi() { printf("Bar.hi()\n"); } // Line 7.
}
int main()
{
Foo b = new Bar;
b.hi();
return 0;
}
Compiles on DMD 0.101 but prints:
Foo.hi()
Add "override" and the compiler prints:
test.d(7): function hi function hi does not override any
Sep 12 2004








"Vathix" <vathixSpamFix dprogramming.com>