Explorar el Código

fixed bug when super.inlineFunction()

Nicolas Cannasse hace 15 años
padre
commit
fbce86e6cd
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      optimizer.ml

+ 1 - 0
optimizer.ml

@@ -50,6 +50,7 @@ let type_inline ctx cf f ethis params tret p =
 			assert false
 	in
 	let params = loop params f.tf_args in
+	let ethis = (match ethis.eexpr with TConst TSuper -> { ethis with eexpr = TConst TThis } | _ -> ethis) in
 	let vthis = gen_local ctx ethis.etype in
 	let this_count = ref 0 in
 	let local i =