[Issue 15897] private base functions not callable from base class module without type change
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 16 06:08:06 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15897
--- Comment #4 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Martin Nowak from comment #3)
> Yes I think that should compil, just like this works.
> ...
> cat.create(); // >> no property create for type 'b.cat'
The comment implies that it doesn't compile, but I tested and it does.
Another case:
private void create(Animal animal) { import std.stdio; writeln("ufcs"); }
class Animal
{
void create() { import std.stdio; writeln("member"); }
}
void main() { foo(new Cat); }
prints: ufcs
In 2.070.2 it prints: member
--
More information about the Digitalmars-d-bugs
mailing list