typifier: check local vars, global vars, and function arguments to exist

This commit is contained in:
Dzmitry Malyshau committed 2022-01-14 12:44:27 -05:00
1 parent 003ea29a3a
commit a4ea9ce68d
3 files changed
+25 -13

No files matched your search

+1 -7
View File
@@ -819,13 +819,7 @@ impl super::Validator {
module: &crate::Module,
mod_info: &ModuleInfo,
) -> Result<FunctionInfo, WithSpan<FunctionError>> {
#[cfg(feature = "validate")]
let mut info = mod_info
.process_function(fun, module, self.flags)
.map_err(WithSpan::into_other)?;
#[cfg(not(feature = "validate"))]
let info = mod_info.process_function(fun, module, self.flags)?;
let mut info = mod_info.process_function(fun, module, self.flags)?;
#[cfg(feature = "validate")]
for (var_handle, var) in fun.local_variables.iter() {