aboutsummaryrefslogblamecommitdiff
path: root/tests/pos/i262-null-subtyping.scala
blob: 5e57fcca0a8f728d7761f2ac6b4426a17684ef44 (plain) (tree)
1
2
3
4
5
6
          


                                         
 
                                            









                                                
object O {
  trait Base extends Any { type T }
  val a: Base { type T } = null;
  val b: Any with Base { type T } = null;

  val c: AnyRef with Base { type T } = null;

  class A
  class B

  val d: A & B = null
  val e: A | B = null

  val f: (A & B) { def toString: String } = null
  val g: (A | B) { def toString: String } = null
}