Browse Source

[overloads] fix order

Simon Krajewski 3 years ago
parent
commit
b30ccac5dc

+ 1 - 1
src/codegen/overloads.ml

@@ -280,7 +280,7 @@ struct
 			let rec loop best l = match l with
 				| [] ->
 					begin match best with
-						| Some(_,_,l) -> l
+						| Some(_,_,l) -> List.rev l
 						| None -> []
 					end
 				| fcc :: l ->

+ 0 - 8
tests/misc/projects/Issue10205/Main.hx

@@ -1,8 +0,0 @@
-class Main {
-	static function main() {
-		test('hello');
-	}
-
-	overload extern static inline function test(s:String) {}
-	overload extern static inline function test(s:String, ...r:String) {}
-}

+ 0 - 1
tests/misc/projects/Issue10205/compile-fail.hxml

@@ -1 +0,0 @@
---main Main

+ 0 - 3
tests/misc/projects/Issue10205/compile-fail.hxml.stderr

@@ -1,3 +0,0 @@
-Main.hx:3: characters 3-16 : Ambiguous overload, candidates follow
-Main.hx:6: characters 41-45 : ... (s : String) -> Void
-Main.hx:7: characters 41-45 : ... (s : String, r : haxe.Rest<String>) -> Void