Skip to content

checker: fix being too strict with generics in assignment type mismatch checking - #20346

Merged
spytheman merged 2 commits into
vlang:masterfrom
shove70:patch-1
Jan 2, 2024
Merged

spytheman merged 2 commits into
vlang:masterfrom
shove70:patch-1

Conversation

@shove70

@shove70 shove70 commented Jan 2, 2024 •

Copy link
Copy Markdown
Contributor

Close #20335

This PR is a patch to PR #20327, temporarily relaxing the mismatch check on generic types. :)

  1. The test case of the original PR 20327 continues to be valid
  2. discord.v on the submitted 94d5563 can already be compiled properly.

At present, the type mismatch check on assignment is too lenient for generics, and there will be some missed cases. I have written it down in a memo and arranged time for detailed handling

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work. Thank you very much.

@spytheman
spytheman merged commit 7a56ebf into vlang:master Jan 2, 2024
@shove70
shove70 deleted the patch-1 branch January 2, 2024 21:53
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.

Compiler incorrectly errors on generic method

2 participants