Fix: [for cherry-picking] Updated namespace binding to preserve an exis

Closed
QO
2mo ago
+41-3

Fixed Findings

  • Preserve enum types across namespace merges

Automated fix from agentic review of https://github.com/metaphorics/bamTiScript/pull/212

Qodo Logo

Summary by Sourcery

Preserve enum type information across namespace merges while retaining constructor types for standalone namespaces.

Bug Fixes:

  • Preserve canonical enum types when same-name namespaces are merged into numeric or string enums.

Tests:

  • Add regression coverage verifying numeric and string enum namespace merges retain their enum types.

Summary by cubic

Preserves enum types when a namespace merges into a numeric or string enum. Previously, the namespace binding overwrote the enum's canonical type with a constructor type; now the enum type is kept, while standalone namespaces still use constructor types.