-
-
Notifications
You must be signed in to change notification settings - Fork 691
Closed
Labels
platform-csEverything related to c#Everything related to c#platform-javaEverything related to JavaEverything related to Javapriority-low
Milestone
Description
class Test {
@:overload static function good(v:Int):Void {}
@:overload static function good(v:Float):Void {}
@:overload static function bad(v:Array<Int>):Void {}
@:overload static function bad(v:Array<Float>):Void {}
static function main():Void {
good(1); //no problem
bad([1]); //Test.hx:8: characters 2-10 : Ambiguous overload
}
}workaround would be to manually type the argument, however...
class Test {
@:overload static function good(v:Int):Void {}
@:overload static function good(v:Float):Void {}
@:overload static function bad(v:Array<Int>):Void {}
@:overload static function bad(v:Array<Float>):Void {}
static function main():Void {
bad(([1]:Array<Int>));
}
}native compilation error:
haxelib run hxjava hxjava_build.txt --haxe-version 3200
javac "-sourcepath" "src" "-d" "obj" "-g:none" "@cmd"
src/haxe/root/Test.java:45: error: method bad(Array<Object>) is already defined in class Test
public static void bad(haxe.root.Array<java.lang.Object> v)
^
1 error
Compilation error
Native compilation failed
Error: Build failed
[Finished in 1.6s with exit code 1]
Metadata
Metadata
Assignees
Labels
platform-csEverything related to c#Everything related to c#platform-javaEverything related to JavaEverything related to Javapriority-low