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

Test case for recently improved unchecked warning #3204

Merged
merged 1 commit into from
Dec 13, 2013

Conversation

retronym
Copy link
Member

Prior to #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.

@retronym
Copy link
Member Author

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.
Copy link
Contributor

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?

Copy link
Member Author

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.

@adriaanm
Copy link
Contributor

adriaanm commented Dec 4, 2013

ping

@retronym
Copy link
Member Author

retronym commented Dec 6, 2013

checkfile updated

@xeno-by
Copy link
Contributor

xeno-by commented Dec 7, 2013

PLS REBUILD/pr-scala@0a9bb1d

@xeno-by
Copy link
Contributor

xeno-by commented Dec 7, 2013

LGTM

@ghost ghost assigned xeno-by Dec 7, 2013
@scala-jenkins
Copy link

(kitty-note-to-self: ignore 30060390)
🐱 Roger! Rebuilding pr-scala for 0a9bb1df. 🚨

@adriaanm
Copy link
Contributor

adriaanm commented Dec 9, 2013

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.
@retronym
Copy link
Member Author

rebased

adriaanm added a commit that referenced this pull request Dec 13, 2013
Test case for recently improved unchecked warning
@adriaanm adriaanm merged commit 2752758 into scala:master Dec 13, 2013
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.

4 participants