New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type parameter broken in multiType abstract #10123
Labels
Comments
This might actually be about class Main {
static function main() {
var c:Collection<Int, Bool> = null;
$type(c.get().item); // Bool
$type(c.item); // Unknown<0>
}
}
@:forward
@:multiType
abstract Collection<K, Item>(ICollection<Item>) {
public function new();
@:to function toIntCollection<K:Int, Item>():ICollection<Item> {
return null;
}
public function get() {
return this;
}
}
interface ICollection<Item> {
var item:Item;
} |
Actually, it works better since Haxe 4.2 @:to static function toIntCollection<K:Int,V>(t:ICollection<V>):ICollection<V> {
return null;
} @:to function toIntCollection():ICollection<V> {
return null;
} |
kevinresol
added a commit
to kevinresol/coconut.ds
that referenced
this issue
Mar 16, 2021
kevinresol
added a commit
to kevinresol/coconut.ds
that referenced
this issue
Mar 16, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
4.1.5 prints
Warning : Bool
4.2.0 prints
Warning : Unknown<0>
comment out the
@:to
will make it printBool
againThe text was updated successfully, but these errors were encountered: