Explorar o código

correctly set function type for member var fields

Simon Krajewski %!s(int64=12) %!d(string=hai) anos
pai
achega
65e1038e2e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -214,7 +214,7 @@ let type_function_param ctx t e opt p =
 		t, e
 
 let type_var_field ctx t e stat p =
-	if stat then ctx.curfun <- FunStatic;
+	if stat then ctx.curfun <- FunStatic else ctx.curfun <- FunMember;
 	let e = type_expr ctx e (WithType t) in
 	unify ctx e.etype t p;
 	match t with