D1->D2 member call syntax regression?

Nick Sabalausky a at a.a
Tue Jul 27 20:51:09 PDT 2010


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:i2nqs5$jss$1 at digitalmars.com...
> It seems to work, on 2.042, and on dmd 2.047:
> http://ideone.com/dcsK3
>
> Bye,
> bearophile

That's because my original example accidentally made Foo an uninstantiated 
class template, so the compiler never bothered to check the semantics...

The following fails on 2.046 and 2.042, but works fine on 1.062:

class Foo {
    void bar(string s) {}
    void foo() {
        string str = "hello";
        str.bar();
    }
}
void main() {} 




More information about the Digitalmars-d-learn mailing list