Nicolas Cannasse %!s(int64=14) %!d(string=hai) anos
pai
achega
03fc90f198
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      typeload.ml

+ 2 - 2
typeload.ml

@@ -313,11 +313,11 @@ let check_overriding ctx c p () =
 				else if f.cf_public <> f2.cf_public then
 					display_error ctx ("Field " ^ i ^ " has different visibility (public/private) than superclass one") p
 				else (match f.cf_kind, f2.cf_kind with
+				| _, Method MethInline ->
+					display_error ctx ("Field " ^ i ^ " is inlined and cannot be overridden") p
 				| a, b when a = b -> ()
 				| Method MethInline, Method MethNormal ->
 					() (* allow to redefine a method as inlined *)
-				| _, Method MethInline ->
-					display_error ctx ("Field " ^ i ^ " is inlined and cannot be overridden") p
 				| _ ->
 					display_error ctx ("Field " ^ i ^ " has different property access than in superclass") p);
 				try