Open
Description
Compiler version
3.4.0
Minimized code
https://scastie.scala-lang.org/gxYxc2GGSL2Kakv3xDQyKA
final abstract class ForcedRecompilationToken[T]
object ForcedRecompilationToken {
implicit def default: ForcedRecompilationToken["abc"] = null
}
object x {
abstract class GoodNoParens[T](implicit ev: ForcedRecompilationToken[T])
}
type BadNoParens[T] = x.GoodNoParens[T]
object App extends App {
// error
new BadNoParens {}
// ok
new BadNoParens() {}
new x.GoodNoParens {}
println("compiled")
}
Output
x.GoodNoParens is not a class type
Expectation
Same issue as in #18623, but this time it's when instantiating via new
instead of declaring an object.