summaryrefslogtreecommitdiff
path: root/test/files/neg/null-unsoundness.scala
blob: 0f8ed5e3140d3c374d3c3701ec24bf92c6dc24ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class B
class C(x: String) extends B

class A {
  type A >: Null
  class D { type T >: C <: B }
  val x: A with D = null
  var y: x.T = new C("abc")
}
object Test extends A with App {
  class C { type T = Int; val x = 1 }
  type A = C
  y = 42
}