Closed
Description
The following code should not compile, as it allows unsound constructs:
object Test {
trait A { def polymorphic[x]: Int }
val a = new A { val polymorphic = Unit }
}
(compiles in both 0.10.0-RC1
and 0.11.0-bin-20181113-bf5ba46-NIGHTLY
.)
The code fails as expected when trait
is replaced with abstract class
.