HaxeFoundation / HaxeFoundation/haxe

Static @:to cast broken

Open
#10,137 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.