فهرست منبع

enable super-as-value errors again

Simon Krajewski 11 سال پیش
والد
کامیت
98de273f56
2فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 0 0
      tests/unit/issues/Issue2750.hx
  2. 1 2
      typer.ml

+ 0 - 0
tests/unit/issues/Issue2750.hx.disabled → tests/unit/issues/Issue2750.hx


+ 1 - 2
typer.ml

@@ -2448,8 +2448,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
 	| EField(_,n) when n.[0] = '$' ->
 		error "Field names starting with $ are not allowed" p
 	| EConst (Ident s) ->
-		(* TODO: let's deal with this later *)
-		(* if s = "super" && with_type <> NoValue then error "Cannot use super as value" p; *)
+		if s = "super" && with_type <> NoValue then error "Cannot use super as value" p;
 		(try
 			acc_get ctx (type_ident_raise ~imported_enums:false ctx s p MGet) p
 		with Not_found -> try