Fix build.

This commit is contained in:
Stephen Chung 2022-02-25 09:00:15 +08:00
parent 23c74cac61
commit 07a61a9562

View File

@ -1721,7 +1721,8 @@ impl Module {
// Variables with an alias left in the scope become module variables
for (name, value, mut aliases) in scope {
// It is an error to export function pointers that refer to encapsulated functions
// It is an error to export function pointers that refer to encapsulated local functions
#[cfg(not(feature = "no_function"))]
if let Some(fn_ptr) = value.downcast_ref::<crate::FnPtr>() {
if ast.iter_fn_def().any(|f| f.name == fn_ptr.fn_name()) {
return Err(crate::ERR::ErrorMismatchDataType(