Skip to content

fix(codex): class-string is not contained by known string literals#1638

Merged
azjezz merged 1 commit intocarthage-software:mainfrom
edsrzf:class-string-subtyping
Apr 15, 2026
Merged

fix(codex): class-string is not contained by known string literals#1638
azjezz merged 1 commit intocarthage-software:mainfrom
edsrzf:class-string-subtyping

Conversation

@edsrzf
Copy link
Copy Markdown
Contributor

@edsrzf edsrzf commented Apr 15, 2026

📌 What Does This PR Do?

Fixes a bug in the type comparator that caused class-string to be contained by known literal string types like 'foo'.

🔍 Context & Motivation

I found this while trying to figure out why this code wasn't working as expected: https://mago.carthage.software/playground#019d8d85-da2f-f6f4-9084-29849466e6e3

🛠️ Summary of Changes

  • Bug Fix: Fixed a type comparator bug causing class strings to be subtypes of known string literals.

📂 Affected Areas

  • Analyzer
  • Linter
  • Formatter
  • CLI
  • Dependencies
  • Documentation
  • Other (please specify):

🔗 Related Issues or PRs

None

📝 Notes for Reviewers

Claude Code was used to help author this change. New unit tests in scalar_comparator follow the pattern set by array_comparator.

@azjezz azjezz added c-codex Type system representation and codebase metadata t-bug Something isn't working labels Apr 15, 2026
@azjezz azjezz merged commit ef42caf into carthage-software:main Apr 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-codex Type system representation and codebase metadata t-bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants