HaxeFoundation / HaxeFoundation/haxe
Some issue with resolution/variance for abstracts in Map key parameter
Open
bug
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Example:
```haxe
abstract Foo({ bar: Int }) {}
function main() {
final map: Map = new Map(); // error: Foo should be { bar : Int }
}
```
There is no error If underlying type for `Foo` is simply `Int`.
There is no error If `Foo` has direct `to` or `@:forward.variance`.
Looks like during selection of implementation for `Map` key type was replaced by underlying one.
Contributor guide
Assessment
This issue has not been assessed yet.