Skip to content

Fix #8392: Remove parameter type bounds from scala.compiletime.ops.any types #8723

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

Merged
merged 1 commit into from
Apr 15, 2020

Conversation

MaximeKjaer
Copy link
Contributor

Fixes #8392

String is not a subtype of AnyVal, so the type "" == "" could not be applied.

As discussed in the issue, having no type bound on the parameters of the == type is preferable to a type bound of Singleton as it maintains the ability to have an unapplied type Int == Int, and is more in line with the any package name.

Fixes scala#8392

String is not a subtype of AnyVal, so the type `==["", ""]` could not
be applied. No type bound is preferable to a type bound of `Singleton`
as it maintains the ability to have an unapplied type `Int == Int`, and
is more in line with the `any` package name.
Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@liufengyun liufengyun merged commit 624cc47 into scala:master Apr 15, 2020
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.

Cant use compiletime.ops.any.== with String when type of a value
4 participants