[Issue 16301] CTFE execution of opApply keeps wrong "this" context in foreach's body
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri May 19 10:16:02 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=16301
--- Comment #7 from Walter Bright <bugzilla at digitalmars.com> ---
Don Clugston writes about this problem:
I bet the problem is around dinterpret.d line 4966.
---
else if (ecall.op == TOKdelegate)
{
// Calling a delegate
fd = (cast(DelegateExp)ecall).func;
pthis = (cast(DelegateExp)ecall).e1;
// Special handling for: &nestedfunc -->
DelegateExp(VarExp(nestedfunc), nestedfunc)
if (pthis.op == TOKvar && (cast(VarExp)pthis).var == fd)
pthis = null; // context is not necessary for CTFE
---
"Context is not necessary for CTFE".
I doubt very much that that is true.
--
More information about the Digitalmars-d-bugs
mailing list