Closed
Description
Regression found in Open CB for ist-dsi/scala-keystone-client - build logs
Compiler version
3.3.1-RC1-bin-20230204-a356581-NIGHTLY
3.3.1-RC4
Bisect points to 11854bb
If you're not sure what version you're using, run print scalaVersion
from sbt
(if you're running scalac manually, use scalac -version
instead).
Minimized code
abstract class Service[F[_]](val name: String)
abstract class CrudService[F[_]](name: String) extends Service[F](name)
trait Foo[F[_]] { self: CrudService[?] =>
val x = self.name
}
Output
-- [E008] Not Found Error: /Users/wmazur/projects/dotty/bisect/main.scala:6:15 -
6 | val x = self.name
| ^^^^^^^^^
|value name is not a member of CrudService[?[_$2]] & Foo[F] - did you mean (Foo.this : CrudService[?[_$2]] & Foo[F]).name?
Expectation
I'm not sure if it's a fix of corner case or real regression, it's only present when using at least 1 wildcard type. When defining self: CrudService[F] =>
it fails with every stable Scala version
> scala-cli compile --server=false bisect/main.scala -S 3.0
-- [E008] Not Found Error: /Users/wmazur/projects/dotty/bisect/main.scala:6:15 -
6 | val x = self.name
| ^^^^^^^^^
|value name is not a member of CrudService[F] & Foo[F] - did you mean (Foo.this : CrudService[F] & Foo[F]).name?