effekt-lang / effekt-lang/effekt
Spurious "Type A escapes through type List[A] inferred for the result of the if statement."
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
I've seen this multiple times locally, but thought that it's a LSP-related issue.
But now it seems to have broken the build on `master`:
https://github.com/effekt-lang/effekt/actions/runs/13927195740/job/38974717008#step:11:932
For posterity, here's an excerpt from the log:
```
==> X effekt.JavaScriptTests.examples/neg/multiple_main.effekt (js) 1.961s munit.FailException: /home/runner/work/effekt/effekt/effekt/jvm/src/test/scala/effekt/EffektTests.scala:145
144: |----------------------------------------------
145: |${ messages.map(m => messaging.formatMessage(m)).distinct.mkString("\n\n") }""".stripMargin)
146:
Error: ot find an message [error] line 1: Multiple main functions
Compilation resulted in the following messages
----------------------------------------------
Error: /home/runner/work/effekt/effekt/libraries/common/list.effekt:382:3: Type A escapes through type List[A] inferred for the result of the if statement.
Error: /home/runner/work/effekt/effekt/libraries/common/list.effekt:382:3: Cannot compile dependency: /home/runner/work/effekt/effekt/libraries/common/list
```
and here's where the error comes from, line 382 is `if (n <= 0) {`
https://github.com/effekt-lang/effekt/blob/55e373b537fcf104419b5ec3685a09e1faa2a5e6/libraries/common/list.effekt#L381-L387
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.