Skip to content

inference regression with aliased existential #6014

@scabug

Description

@scabug

This almost has to be a duplicate of something, but I can't find it and it's bad, so opening until I or someone finds the duplicate. This compiles with 2.9.2.

object Test {
  case class CC[T](key: T)
  type Alias[T] = Seq[CC[T]]

  def f(xs: Seq[CC[_]]) = xs map { case CC(x) => CC(x) }    // ok
  def g(xs: Alias[_])   = xs map { case CC(x) => CC(x) }    // fails
  // ./a.scala:11: error: missing parameter type for expanded function
  // The argument types of an anonymous function must be fully known. (SLS 8.5)
  // Expected type was: ?
  //   def g(xs: Alias[_])   = xs map { case CC(x) => CC(x) }    // fails
  //                                  ^
  // one error found
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions