Calculate whether contains global functions during indexing.

This commit is contained in:
Stephen Chung
2021-03-05 20:07:35 +08:00
parent 4e5039d4fe
commit 65ef32af19
4 changed files with 78 additions and 77 deletions

View File

@@ -1893,7 +1893,7 @@ impl Engine {
if mods
.scan_raw()
.skip(_mods_len)
.any(|(_, m)| m.has_namespace(crate::FnNamespace::Global, true))
.any(|(_, m)| m.contains_indexed_global_functions())
{
if _restore_fn_resolution_cache {
// When new module is imported with global functions and there is already