[Issue 6816] [CTFE] nested function can't access this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 16 14:04:26 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6816
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #1 from Don <clugdbug at yahoo.com.au> 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: -------
More information about the Digitalmars-d-bugs
mailing list