Explorar o código

fixed bug when super.inlineFunction()

Nicolas Cannasse %!s(int64=15) %!d(string=hai) anos
pai
achega
fbce86e6cd
Modificáronse 1 ficheiros con 1 adicións e 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 =