Skip to content
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

Consistently use TypeMismatch in TreeChecker #21529

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Sep 2, 2024

No description provided.

@dwijnand dwijnand marked this pull request as ready for review September 3, 2024 08:49
@dwijnand dwijnand requested a review from hamzaremmal September 3, 2024 08:50
private def checkType(tp1: Type, tp2: Type, tree: untpd.Tree, step: String)(using Context) =
// Accept NoType <:< NoType as true
assert((tp1 eq tp2) || (tp1 <:< tp2), {
val mismatch = TypeMismatch(tp1, tp2, None)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it be ?

Suggested change
val mismatch = TypeMismatch(tp1, tp2, None)
val mismatch = TypeMismatch(tp1, tp2, Some(tree))

Copy link
Member Author

Choose a reason for hiding this comment

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

No, because I'm adding .className to the tree ouput.

@hamzaremmal hamzaremmal assigned dwijnand and unassigned hamzaremmal Sep 11, 2024
@dwijnand dwijnand merged commit 687deb1 into scala:main Sep 11, 2024
28 checks passed
@dwijnand dwijnand deleted the TreeChecker-divergenceMsg branch September 11, 2024 09:25
WojciechMazur added a commit that referenced this pull request Dec 4, 2024
Backports #21529 to the 3.3.5.

PR submitted by the release tooling.
[skip ci]
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