-
Notifications
You must be signed in to change notification settings - Fork 52
Lambda type aliases: report arity mismatch instead of silent fallthrough #1301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
MikaelMayer
wants to merge
38
commits into
main2
Choose a base branch
from
issue-1239-lambda-type-aliases-aliasdef-tconsalias
base: main2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
c71982f
Report arity mismatch for type aliases instead of silently returning …
MikaelMayer 9c8aace
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 907a4ad
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer d4812e6
ci: retry after transient cache miss in downstream jobs
MikaelMayer 21a3f50
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 60e8e1c
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer f4830da
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 5fb6607
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 6a95cfe
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer c2a17c7
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 5f805a4
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer a60bc8b
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer ad55381
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 33bd612
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 2373662
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer c6b02d0
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 6a5eb8f
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer b09accb
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 119dc19
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer bc38f45
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer ae84d01
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer c94a1ce
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 9a5a730
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 2e7263c
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer ed4b23f
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer cbf3abd
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer c6e1c78
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 14845a9
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer f03a165
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 89892e0
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 7173272
ci: delete stale cache before saving to prevent downstream cache misses
MikaelMayer 170315b
ci: save lake cache even when a prior step fails
MikaelMayer eaa2c93
ci: revert cache delete step that caused downstream cache miss
MikaelMayer e11e769
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 4639671
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer bde83c1
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer 738b50f
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer c1ef8f6
Merge remote-tracking branch 'origin/main2' into issue-1239-lambda-ty…
MikaelMayer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖🔍 Nit:
find?returns the first alias matching by name. If the alias list ever contains multiple entries with the same name but different arities (e.g., overloaded aliases), the error message will report the arity of whichever appears first, which may not be the one the user intended. Consider whether the error message should list all registered arities for that name (e.g., "expected 1 or 3 type argument(s)").Context
This is a minor edge case — if aliases are unique by name (which seems likely given the
AliasesWFinvariant), this is a non-issue. But if overloading by arity is ever supported, this would produce a confusing message.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 Good observation. As you noted, aliases are unique by name in the current system —
TContext.AliasesWFensures per-alias well-formedness, and the alias registration path does not allow duplicate names. ThetconsAliasfunction already matches by name+arity, socheckAliasArityis only reached when no exact match exists. If overloading by arity is ever supported, we would need to revisit this, but for now the single-arity message is correct.