effekt-lang / effekt-lang/effekt
Values of type 'Any' can be converted to everything
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
The following code compiles, but I'm not confident it should:
```scala
def exVeritateQuodlibet[A](a: Any): A = a match {}
```
This is likely an artefact of #1219.
---
If I had to guess, it's an interplay between the Core generation for an empty match
https://github.com/effekt-lang/effekt/blob/34bbb3e7855d4ce0a7c0c985394805d8a025f275/effekt/shared/src/main/scala/effekt/core/Transformer.scala#L381-L385
and `Any` being declared as an empty type
https://github.com/effekt-lang/effekt/blob/34bbb3e7855d4ce0a7c0c985394805d8a025f275/effekt/shared/src/main/scala/effekt/symbols/builtins.scala#L44-L45
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by compiling the example, then inspect the empty-match Core generation in effekt/shared/src/main/scala/effekt/core/Transformer.scala and the Any declaration in effekt/shared/src/main/scala/effekt/symbols/builtins.scala. Determine whether the conversion is intended and document the resulting behavior with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100