Closed jiribenes closed 2 weeks ago
This is the situation on current master:
This works:
def ap(c: Container, k: Int): Bool = {
(c.eqz)(k)
}
I'll close this for now, since I don't know a better solution and box/unbox might need to be redesigned anyway.
Feel free to open again if you disagree.
I can confirm that even the ap2
function works on current master
, so the issue is truly resolved :)
On both the website and my local installation (Effekt v0.8.0), the following code returns what seems like a compiler panic:
Minimised repro:
Of course, you can fix this by calling
eqz
(the local binding) instead. Otherwise this is very reminiscent of #635.Funnily enough, it's somewhat random where exactly the error appears in the editor.
As a note, I haven't yet tried it on the current
master
with #671 merged.A similar issue happens even if we try to bind the same thing twice:
Relevant code: https://github.com/effekt-lang/effekt/blob/dc9149737c9d713ce04a26591d77d8cdfccf50e7/effekt/shared/src/main/scala/effekt/typer/BoxUnboxInference.scala#L86-L100