Open
Description
Create the following two compilation units in package test:
// test/package.scala
package object test {
type Seq[+A] = scala.collection.immutable.Seq[A]
}
// test/Foo.scala
package test
object Foo {
def foo(s: Seq[Any]) = ()
foo(Seq()) // <-- presentation compiler reports error here
}
The error reported by the presentation compiler is type mismatch; found : Seq[Nothing] required: test.Seq[Any] (which expands to) scala.collection.immutable.Seq[Any]
.
Changing Seq()
to scala.collection.immutable.Seq()
fixes the problem. But of course it shouldn't be necessary given the type alias definition in the package object.