We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9416af commit 015b228Copy full SHA for 015b228
compiler/lib-wasm/code_generation.ml
@@ -534,8 +534,11 @@ and expression_type (e : W.expression) st =
534
| Try _ -> None, st
535
| LocalGet x | LocalTee (x, _) -> variable_type x st
536
| GlobalGet x ->
537
- let typ = (Var.Map.find x st.context.constant_globals).typ in
538
- (if Poly.equal typ st.context.value_type then None else Some typ), st
+ ( (try
+ let typ = (Var.Map.find x st.context.constant_globals).typ in
539
+ if Poly.equal typ st.context.value_type then None else Some typ
540
+ with Not_found -> None)
541
+ , st )
542
| Seq (_, e') -> expression_type e' st
543
| Pop typ -> Some typ, st
544
| RefI31 _ -> Some (Ref { nullable = false; typ = I31 }), st
0 commit comments