Skip to content

Issue with GADTs tasty types #2944

Closed
Closed
@nicolasstucki

Description

@nicolasstucki
trait Map2[K] {
  def get(k: K) = null
  def foo = {
    this match {
      case that: Map2[b] => that.get(3.asInstanceOf[b])
      case that: Map2[c] => that.get(4.asInstanceOf[K])
      case _ => get(5.asInstanceOf[K])
    }
  }
}

gets wrong types for binding in 3.asInstanceOf[b] and 4.asInstanceOf[K] involving b and c.

The full tasty pretty printed is here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions