Explorar o código

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

Aleksandr Kuzmenko %!s(int64=5) %!d(string=hai) anos
pai
achega
9af741a447
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)