Skip to content

test(mq-check): add negative cases for self pipe type propagation#1371

Closed
Copilot wants to merge 2 commits intofeat/mq-check-piped-self-constraintfrom
copilot/sub-pr-1370
Closed

test(mq-check): add negative cases for self pipe type propagation#1371
Copilot wants to merge 2 commits intofeat/mq-check-piped-self-constraintfrom
copilot/sub-pr-1370

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 2, 2026

The existing tests for self keyword and argument-position builtin calls only asserted absence of errors on valid input, leaving room for the positive cases to pass silently even if type propagation was broken.

Changes

  • Negative assertions in test_self_keyword_preserves_piped_type: three new !is_empty() checks confirm the type checker correctly rejects incompatible pipeline chains:
"hello" | self | sort   # string → self → array-only builtin: must error
42      | self | sort   # number → self → array-only builtin: must error
"hello" | upcase | sort # confirms propagation through the whole chain, not just self

These cases would silently pass if self discarded the piped type or if overload resolution was simply deferred without actual unification.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update support for piped calls and self keyword test(mq-check): add negative cases for self pipe type propagation Mar 2, 2026
@harehare harehare marked this pull request as ready for review March 2, 2026 12:41
@harehare
Copy link
Copy Markdown
Owner

harehare commented Mar 2, 2026

@copilot

@harehare harehare closed this Mar 2, 2026
@harehare harehare deleted the copilot/sub-pr-1370 branch March 15, 2026 14:14
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