February 09, 2013 [Issue 9490] New: 'this' is not found when array expression is in parentheses | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=9490 Summary: 'this' is not found when array expression is in parentheses Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-09 10:31:51 PST --- class C { int[] arr; this() { // ok assert(arr.length); // Error: need 'this' to access member arr assert((arr).length); } } void main() { } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 29, 2013 [Issue 9490] 'this' is not found when array expression is in parentheses | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=9490 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull CC| |yebblies@gmail.com AssignedTo|nobody@puremagic.com |yebblies@gmail.com --- Comment #1 from yebblies <yebblies@gmail.com> 2013-06-29 13:16:31 EST --- arr goes the IdentifierExp -> DsymbolExp -> DotVarExp path, while (arr) seems to go the TypeExp -> VarExp -> Error path. Producing DsymbolExp when resolving TypeExp to a variable does the trick, but breaks other code. -- 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