Fixed not unfrezzing typechecker before loading definition files

This commit is contained in:
HawDevelopment 2022-07-06 15:26:49 +02:00
parent 7633ff83f0
commit 91a5c8a67c

View file

@ -645,6 +645,8 @@ ScopePtr Frontend::getModuleEnvironment(const SourceModule& module, const Config
if (!config.globalTypePaths.empty()) if (!config.globalTypePaths.empty())
{ {
unfreeze(typeChecker.globalTypes);
result = std::make_shared<Scope>(result); result = std::make_shared<Scope>(result);
for (const std::string& path : config.globalTypePaths) for (const std::string& path : config.globalTypePaths)
{ {
@ -654,6 +656,8 @@ ScopePtr Frontend::getModuleEnvironment(const SourceModule& module, const Config
loadDefinitionFile(typeChecker, typeChecker.globalScope, source->source, path); loadDefinitionFile(typeChecker, typeChecker.globalScope, source->source, path);
} }
freeze(typeChecker.globalTypes);
} }
return result; return result;