Browse Source

[macro] `follow` decoded enum field type (#9828)

Aleksandr Kuzmenko 5 years ago
parent
commit
e4051f4668
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/macro/macroApi.ml

+ 1 - 1
src/macro/macroApi.ml

@@ -1336,7 +1336,7 @@ let decode_cfield v =
 let decode_efield v =
 	let name = decode_string (field v "name")
 	and t = decode_type (field v "type") in
-	match t with
+	match follow t with
 	| TEnum (enm,_) | TFun (_,TEnum (enm,_)) ->
 		(try PMap.find name enm.e_constrs
 		with Not_found -> raise Invalid_expr)