[Issue 10028] New: UFCS requires explicit "this"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 4 05:20:04 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10028
Summary: UFCS requires explicit "this"
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: puneet at coverify.org
--- Comment #0 from Puneet Goel <puneet at coverify.org> 2013-05-04 05:20:03 PDT ---
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 UFCS. But it gives an error for line 3
because it does not get this pointer to bind as argument.
I would expect even line 3 to compile.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list