We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5682bd1 commit 8d2a081Copy full SHA for 8d2a081
compiler/lib-wasm/code_generation.ml
@@ -537,8 +537,11 @@ and expression_type (e : W.expression) st =
537
| Br_on_null _ -> None, st
538
| LocalGet x | LocalTee (x, _) -> variable_type x st
539
| GlobalGet x ->
540
- let typ = (Var.Map.find x st.context.constant_globals).typ in
541
- (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
542
+ if Poly.equal typ st.context.value_type then None else Some typ
543
+ with Not_found -> None)
544
+ , st )
545
| Seq (_, e') -> expression_type e' st
546
| Pop typ -> Some typ, st
547
| RefI31 _ -> Some (Ref { nullable = false; typ = I31 }), st
0 commit comments