May 04, 2013 [Issue 10028] New: UFCS requires explicit "this" | ||||
---|---|---|---|---|
| ||||
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@puremagic.com ReportedBy: puneet@coverify.org --- Comment #0 from Puneet Goel <puneet@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: ------- |
May 04, 2013 [Issue 10028] UFCS requires explicit "this" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Puneet Goel | http://d.puremagic.com/issues/show_bug.cgi?id=10028 Maxim Fomin <maxim@maxim-fomin.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |maxim@maxim-fomin.ru Resolution| |INVALID --- Comment #1 from Maxim Fomin <maxim@maxim-fomin.ru> 2013-05-04 09:13:06 PDT --- Closed, see http://forum.dlang.org/thread/mailman.1027.1367665889.4724.digitalmars-d@puremagic.com -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation