UFCS requires explicit this
d coder
dlang.coder at gmail.com
Sat May 4 04:10:33 PDT 2013
Greetings
Consider the following code ...
class Foo { // 1
void foo() { // 2
bar(); // 3
this.bar(); // 4
} // 5
} // 6
void bar(Foo f) { // 7
import std.stdio; // 8
writeln("This bar"); // 9
} // 10
void main() { // 11
Foo test = new Foo; // 12
test.foo(); // 13
} // 14
DMD is fine with line 4 because of UCFS. But it gives an error for line 3
because it does not get this pointer to bind as argument.
I want to know if it is a DMD bug or whether line 3 would be compilable at
some point in future.
Regards
- Puneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130504/f5e215c9/attachment.html>
More information about the Digitalmars-d
mailing list