Skip to content

fixes #25419; lift magic types to typeclasses#25425

Closed
Copilot wants to merge 1 commit into
pr_trabtefrom
copilot/sub-pr-25421
Closed

fixes #25419; lift magic types to typeclasses#25425
Copilot wants to merge 1 commit into
pr_trabtefrom
copilot/sub-pr-25421

Conversation

Copilot AI commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Reviewed PR changes that prevent compilation errors when user-defined procedures shadow magic type names like seq, array, etc.

Changes

  • Added tyUncheckedArray to the set of magic types {tySet, tyArray, tySequence} that are lifted to tyBuiltInTypeClass when their element type is tyNone
  • Used elementType accessor for cleaner type child access
  • tyOpenArray and tyVarargs remain excluded (special-cased at line 1657 to not receive tyNone children)

Example

type
  TRedisList* = seq[TListItem]

# This proc now won't break the type alias above
proc seq*() =
  discard

The fix ensures magic generics are properly represented as typeclasses during semantic analysis, preventing shadowing conflicts.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Fixes #25419; lift magic types to typeclasses fixes #25419; lift magic types to typeclasses Jan 9, 2026
Copilot AI requested a review from ringabout January 9, 2026 12:00
@ringabout ringabout closed this Jan 9, 2026
@ringabout ringabout deleted the copilot/sub-pr-25421 branch January 9, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants