Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting TypeRegister::enable_experimental on the start of compile_syntax_node() #7226

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/compiler/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,16 @@ pub async fn compile_syntax_node(
mut diagnostics: diagnostics::BuildDiagnostics,
#[allow(unused_mut)] mut compiler_config: CompilerConfiguration,
) -> (object_tree::Document, diagnostics::BuildDiagnostics, typeloader::TypeLoader) {
let enable_experimental = compiler_config.enable_experimental;
let mut loader = prepare_for_compile(&mut diagnostics, compiler_config);

let doc_node: parser::syntax_nodes::Document = doc_node.into();

let type_registry =
Rc::new(RefCell::new(typeregister::TypeRegister::new(&loader.global_type_registry)));
if enable_experimental {
type_registry.borrow_mut().expose_internal_types = true;
}
let (foreign_imports, reexports) =
loader.load_dependencies_recursively(&doc_node, &mut diagnostics, &type_registry).await;

Expand Down
Loading