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 fdbf150 commit 2494eeeCopy full SHA for 2494eee
compiler/lib-wasm/code_generation.ml
@@ -535,8 +535,11 @@ and expression_type (e : W.expression) st =
535
| Try _ -> None, st
536
| LocalGet x | LocalTee (x, _) -> variable_type x st
537
| GlobalGet x ->
538
- 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), st
+ ( (try
+ let typ = (Var.Map.find x st.context.constant_globals).typ in
540
+ if Poly.equal typ st.context.value_type then None else Some typ
541
+ with Not_found -> None)
542
+ , st )
543
| Seq (_, e') -> expression_type e' st
544
| Pop typ -> Some typ, st
545
| RefI31 _ -> Some (Ref { nullable = false; typ = I31 }), st
0 commit comments