Skip to content

Commit 0bc56d7

Browse files
Dale-Blackclaude
andcommitted
Suppress NamedTuple constructors in SSA callee resolver
NamedTuple{(:x,:y)} constructors are consumed by kwcall extraction. Must be suppressed in the Core.Const resolver path, not just the callee type check, since the resolver runs first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a88206 commit 0bc56d7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/compiler/codegen.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,11 @@ function compile_call(ctx::JSCompilationContext, expr::Expr)
811811
return "$(func_js)($(join(pos_compiled, ", ")))"
812812
end
813813

814+
# Skip NamedTuple constructors (consumed by kwcall, not needed in JS)
815+
if resolved_fn isa Type && resolved_fn <: NamedTuple
816+
return ""
817+
end
818+
814819
# Check package registry for positional calls
815820
if resolved_fn isa Function
816821
fn_mod = parentmodule(resolved_fn)

0 commit comments

Comments
 (0)