July 09, 2009 [Issue 3159] New: Can't access member variables from templated nested member function | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=3159 Summary: Can't access member variables from templated nested member function Product: D Version: 2.031 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: dsimcha@yahoo.com struct Foo { uint number; void doStuff(uint num) { void doMoreStuff(T)(T num2) { number++; } doMoreStuff(num); } } test.d(7): Error: need 'this' to access member number Also happens if Foo is a class instead of a struct. Does not happen if doMoreStuff() is a plain old function instead of a function template. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 06, 2012 [Issue 3159] Can't access member variables from templated nested member function | ||||
---|---|---|---|---|
| ||||
Posted in reply to dsimcha@yahoo.com | http://d.puremagic.com/issues/show_bug.cgi?id=3159 Kenji Hara <k.hara.pg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-06-06 05:00:45 PDT --- Works in 2.060head. -- 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