You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the following snippet dmd stops with:
dmd: toir.c:249: elem* getEthis(Loc, IRState*, Dsymbol*): Assertion `thisfd->isNested() || thisfd->vthis' failed.
This probably is due to passing the nested function to another function in `transformToInterval`. This snippet is extracted out of context - at that time I successfully used a `struct` template to return multiple functions (tuple didn't work).
```struct IntervalPoint(S){ S x; S tx;}IntervalPoint!S intervalPoint(alias f0, S)(S x){ return IntervalPoint!S(x, f0(x));}auto transform(alias f0, double c)(){ alias t0 = (x) => x + 1; struct Functions2D { alias f0 = t0; } Functions2D f; return f;}auto transformToInterval(alias f0, double c, S)(S x){ auto t = transform!(f0, c); return intervalPoint!(t.f0)(x);}unittest{ alias f0 = (x) => x + 1; auto t = transformToInterval!(f0, 1.0)(1.0);}```
The text was updated successfully, but these errors were encountered:
Do you use an older compiler ? with dmd 2.100.2 there's an error during semantics:
> /tmp/temp_7F6C1D38FB90.d:32:32: Error: function `runnable.__unittest_L35_C1.transformToInterval!(__lambda1, 1.0, double).transformToInterval` cannot get frame pointer to `runnable.__unittest_L35_C1.transform!(__lambda1, 1.0).transform.intervalPoint!(__lambda1, double).intervalPoint`
(In reply to Basile-z from comment #3)
> Do you use an older compiler ? with dmd 2.100.2 there's an error during> semantics:> > > /tmp/temp_7F6C1D38FB90.d:32:32: Error: function `runnable.__unittest_L35_C1.transformToInterval!(__lambda1, 1.0, double).transformToInterval` cannot get frame pointer to `runnable.__unittest_L35_C1.transform!(__lambda1, 1.0).transform.intervalPoint!(__lambda1, double).intervalPoint`
Nope, but I did not use the -unittest switch cause I did not see the unittest.
Anyway, in git master this results in an ice.
Seb reported this on 2016-06-09T02:39:01Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=16143
CC List
Description
The text was updated successfully, but these errors were encountered: