Dan Korostelev пре 7 година
родитељ
комит
2d1e3f0e88
2 измењених фајлова са 12 додато и 11 уклоњено
  1. 12 1
      src/codegen/gencommon/castDetect.ml
  2. 0 10
      src/codegen/gencommon/overloadingConstructor.ml

+ 12 - 1
src/codegen/gencommon/castDetect.ml

@@ -582,8 +582,19 @@ let select_overload gen applied_f overloads types params =
 	| (t,cf) :: _ -> cf,t,false
 	| (t,cf) :: _ -> cf,t,false
 	| _ -> assert false
 	| _ -> assert false
 
 
+let rec cur_ctor c tl =
+	match c.cl_constructor with
+	| Some ctor ->
+		ctor, c, tl
+	| None ->
+		match c.cl_super with
+		| None ->
+			raise Not_found
+		| Some (sup,stl) ->
+			cur_ctor sup (List.map (apply_params c.cl_params tl) stl)
+
 let choose_ctor gen cl tparams etl maybe_empty_t p =
 let choose_ctor gen cl tparams etl maybe_empty_t p =
-	let ctor, sup, stl = OverloadingConstructor.cur_ctor cl tparams in
+	let ctor, sup, stl = cur_ctor cl tparams in
 	(* get returned stl, with Dynamic as t_empty *)
 	(* get returned stl, with Dynamic as t_empty *)
 	let rec get_changed_stl c tl =
 	let rec get_changed_stl c tl =
 		if c == sup then
 		if c == sup then

+ 0 - 10
src/codegen/gencommon/overloadingConstructor.ml

@@ -41,16 +41,6 @@ open Gencommon
 		empty construction without the need of incompatibility with the platform's native construction method
 		empty construction without the need of incompatibility with the platform's native construction method
 		the ability to call super() constructor in any place in the constructor
 		the ability to call super() constructor in any place in the constructor
 *)
 *)
-let rec cur_ctor c tl =
-	match c.cl_constructor with
-	| Some ctor ->
-		ctor, c, tl
-	| None ->
-		match c.cl_super with
-		| None ->
-			raise Not_found
-		| Some (sup,stl) ->
-			cur_ctor sup (List.map (apply_params c.cl_params tl) stl)
 
 
 let rec prev_ctor c tl =
 let rec prev_ctor c tl =
 	match c.cl_super with
 	match c.cl_super with