-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Test case for recently improved unchecked warning #3204
Test case for recently improved unchecked warning #3204
Conversation
Review by @xeno-by |
// - implicit class tags to enable type patterns on abstract types | ||
// - type tests on compound types. | ||
// | ||
// We could try make these work together, but an unchecked warning is okay for now. |
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.
How could we do that?
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.
We could generate implicltly[ClassTag].runtimeClass.isInstance(a) && a.isInstanceOf[Bar]
For _: C with D
we already generate a.isInstanceOf[C] && a.isInstanceOf[D]
, but this is done quite late (in erasure), and it would be tricky to integrate that with the classtag based tests, which are added much earlier.
ping |
checkfile updated |
PLS REBUILD/pr-scala@0a9bb1d |
LGTM |
(kitty-note-to-self: ignore 30060390) |
I think this needs to be rebased -- due to the askLoadedType change |
Prior to scala#2848, the enclosed test compiled without warning and printed: true false Features interacting: - implicit class tags to enable type patterns on abstract types - type tests on compound types. I think the unchecked warning is acceptable for now.
rebased |
Test case for recently improved unchecked warning
Prior to #2848, the enclosed
test compiled without warning and printed:
Features interacting:
I think the unchecked warning is acceptable for now.