[Issue 6816] [CTFE] nested function can't access this

2011-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6816


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||bugzi...@digitalmars.com
 Resolution||FIXED


--- Comment #2 from Walter Bright  2011-11-02 
13:07:32 PDT ---
https://github.com/D-Programming-Language/dmd/commit/3055cc6a8b36a2e00c270b0e48e1d1bd2c931f37

https://github.com/D-Programming-Language/dmd/commit/72e750209b370b66157f320d3517c5816a3951d7

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 6816] [CTFE] nested function can't access this

2011-10-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6816


Don  changed:

   What|Removed |Added

 CC||clugd...@yahoo.com.au


--- Comment #1 from Don  2011-10-16 14:03:28 PDT ---
Another test case, where it's a delegate literal instead of a nested function.

struct S {
size_t foo() {
return (){ return value+1; }();
}
size_t value;
}

enum s = S().foo();

Incidentally if you make 'foo' static, the error message is poor: the message
"need this to access member 'value'" is generated in the glue layer
(SymbolExp::toElem, in e2ir.c). It should be detected in the semantic pass
instead.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---