Browse Source

fixed missing mark_used_enum

Nicolas Cannasse 13 years ago
parent
commit
8d8612c045
1 changed files with 6 additions and 1 deletions
  1. 6 1
      typer.ml

+ 6 - 1
typer.ml

@@ -472,7 +472,12 @@ let field_access ctx mode f t e p =
 	let fnormal() = AKField ((mk (TField (e,f.cf_name)) t p),f) in
 	let normal() =
 		match follow e.etype with
-		| TAnon a -> (match !(a.a_status) with EnumStatics e -> AKField ((mk (TEnumField (e,f.cf_name)) t p),f) | _ -> fnormal())
+		| TAnon a -> 
+			(match !(a.a_status) with
+			| EnumStatics e -> 
+				mark_used_enum ctx e;
+				AKField ((mk (TEnumField (e,f.cf_name)) t p),f)
+			| _ -> fnormal())
 		| _ -> fnormal()
 	in
 	match f.cf_kind with