Skip to content

Failure to type patterns in IntMap #939

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

Closed
DarkDimius opened this issue Nov 9, 2015 · 2 comments
Closed

Failure to type patterns in IntMap #939

DarkDimius opened this issue Nov 9, 2015 · 2 comments

Comments

@DarkDimius
Copy link
Contributor

dotc ./scala-scala/src/library/scala/collection/immutable/IntMap.scala

./scala-scala/src/library/scala/collection/immutable/IntMap.scala:118: error: Pattern type ((T1?), (T2?), (T3?), (T4?)) is neither a subtype nor a supertype of selector type (key: scala.collection.immutable.IntMapUtils.Int)Option[V]
      case IntMap.Bin(_,_, [email protected](_, _), right) => {
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Nov 9, 2015
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Nov 9, 2015
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Nov 10, 2015
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Nov 10, 2015
@odersky
Copy link
Contributor

odersky commented Nov 16, 2015

See #959 for a fix of the original problem. However, this currently dies in backend.

@odersky odersky mentioned this issue Dec 14, 2015
@DarkDimius
Copy link
Contributor Author

The failure was caused by

object Bla {
 ...
 case _: this.type => true
 ...
}

That lead to tree similar to if(TypeTree(Bla) eq selector) .... Such trees should not be ever created.

DarkDimius added a commit to dotty-staging/dotty that referenced this issue Jan 13, 2016
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Jan 13, 2016
DarkDimius added a commit to dotty-staging/dotty that referenced this issue Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants