haxe
haxe copied to clipboard
[js] haxe.Rest argument in inline new, compiler error
class Test {
static function main() {
new S<Int>(10,10);
}
}
class S<T> {
public inline function new(x:Int, y:Int, z:haxe.Rest<T>) {}
}
Tested on latest Haxe https://try.haxe.org/#7a11F6b3
What compiler error? I can only see a warning (will need to update try haxe default defines to avoid it)
Edit: ok, after reading the other issue it seems like the error is for js target (which is not the selected target in your link)
[ERROR] Test.hx:3: characters 3-20
3 | new S<Int>(10,10);
| ^^^^^^^^^^^^^^^^^
| (x : Int, y : Int, z : haxe.Rest<Int>) -> Void should be (Int, Int) -> Void
My bad on the incorrect target link.