Browse Source

[cs/java] only generate TCast for overloaded constructor arguments (see #3379)

Dan Korostelev 11 years ago
parent
commit
53048e6d90
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gencommon.ml

+ 1 - 1
gencommon.ml

@@ -6310,7 +6310,7 @@ struct
 				| TNew (cl, tparams, eparams) -> (try
 				| TNew (cl, tparams, eparams) -> (try
 					let is_overload, cf, sup, stl = choose_ctor gen cl tparams (List.map (fun e -> e.etype) eparams) maybe_empty_t e.epos in
 					let is_overload, cf, sup, stl = choose_ctor gen cl tparams (List.map (fun e -> e.etype) eparams) maybe_empty_t e.epos in
 					let handle e t1 t2 =
 					let handle e t1 t2 =
-						if true then
+						if is_overload then
 							let ret = handle e t1 t2 in
 							let ret = handle e t1 t2 in
 							match ret.eexpr with
 							match ret.eexpr with
 							| TCast _ -> ret
 							| TCast _ -> ret