aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t0904.scala
blob: 28ad30fc2dde51ab95a19c38c3ef0474a27b48a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
trait A {
  def apply(x: Int): Int
  def update(x: Int, y: Int): Unit
}

trait B extends A

abstract class Foo {
  val a: A = null
  val b: B = null

  a(0) = 1
  b(0) = 1

  a(0) += 1
  b(0) += 1 // this one does not type check.
}