瀏覽代碼

do not turn Rest type parameter into a monomorph in the allow_no_params case

Simon Krajewski 11 年之前
父節點
當前提交
7eeb9a1142
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -352,7 +352,7 @@ let rec load_instance ctx t p allow_no_params =
 			| _ -> false,false
 		in
 		let types , path , f = ctx.g.do_build_instance ctx mt p in
-		if allow_no_params && t.tparams = [] then begin
+		if allow_no_params && t.tparams = [] && not (match types with ["Rest",_] -> true | _ -> false) then begin
 			let pl = ref [] in
 			pl := List.map (fun (name,t) ->
 				match follow t with