File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1008,12 +1008,16 @@ function compile_call(ctx::JSCompilationContext, expr::Expr)
10081008 return " "
10091009 end
10101010
1011- # NamedTuple constructor: (%apply_type_result)(%tuple) — skip if result is NamedTuple
1011+ # NamedTuple constructor: (%apply_type_result)(%tuple) — skip, consumed by kwcall
10121012 if callee isa Core. SSAValue
1013- ct = ctx. code_info. ssavaluetypes[callee. id]
1013+ ct = try ctx. code_info. ssavaluetypes[callee. id] catch ; nothing end
10141014 if ct isa Core. Const && ct. val isa Type && ct. val <: NamedTuple
10151015 return " "
10161016 end
1017+ # Also catch the case where callee type is the NamedTuple type itself
1018+ if ct isa DataType && ct <: NamedTuple
1019+ return " "
1020+ end
10171021 end
10181022
10191023 # Core.tuple used for kwargs assembly — skip if result feeds into NamedTuple
You can’t perform that action at this time.
0 commit comments