D1->D2 member call syntax regression?
Jonathan M Davis
jmdavisprog at gmail.com
Tue Jul 27 16:40:24 PDT 2010
On Tuesday, July 27, 2010 16:25:28 Nick Sabalausky wrote:
> In converting some D1 code to D2, I noticed this doesn't seem to work
> anymore:
>
> module mymodule;
> class Foo()
> {
> void bar(string s) {...}
>
> void foo()
> {
> string str = "hello";
> str.bar();
> }
> }
>
> In D1 that works fine, but in D2 (2.047) it complains that it can't find
> "mymodule.bar". That's a bit dissapointing, as I keep hoping member call
> syntax will eventually get expanded, not reduced. Is this a bug, or is
> there some reason for it?
It looks more like a bug fix to me given that the first parameter to bar() is the
invisible this rather than a string, but since I've never used D1, I certainly
can't compare what it does to D2.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list