Properly wrap with newtype-by-void layouts in repl

Closes #4208
This commit is contained in:
Ayaz Hafiz 2022-10-05 11:17:57 -05:00
parent 657346a057
commit e31a16f650
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
5 changed files with 130 additions and 61 deletions

View file

@ -203,7 +203,6 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
&interns,
DebugPrint::NOTHING,
);
let content = subs.get_content_without_compacting(main_fn_var);
let (_, main_fn_layout) = match procedures.keys().find(|(s, _)| *s == main_fn_symbol) {
Some(layout) => *layout,
@ -264,7 +263,7 @@ pub async fn entrypoint_from_js(src: String) -> Result<String, String> {
&mut app,
"", // main_fn_name is ignored (only passed to WasmReplApp methods)
main_fn_layout,
content,
main_fn_var,
&subs,
&interns,
layout_interner.into_global().fork(),