HaxeFoundation / HaxeFoundation/haxe
Static @:to cast broken
Open
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
class Main {
static function main() {
var foo:Foo = {v:1};
var bar:Foo = foo; // 4.1.5: OK, 4.2.0+: Int should be String
var bar:Foo = Foo.intToAny(foo); // 3.4.7: OK, 4.0.0+: Cannot access non-static abstract field statically
}
}
abstract Foo({v:T}) from {v:T} to {v:T} {
@:to public static function intToAny(foo:Foo):Foo {
return {v:null}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.