aboutsummaryrefslogtreecommitdiff
path: root/tests/invalid/pos/pos-bug1241.scala
blob: 1038dc30489cefac6e53be171d081e15f82844f7 (plain) (blame)
1
2
3
4
5
6
7
8
object test extends App {
  // more..
  type T = { def hello(): Unit }
  //val x4 = new AnyRef { def hello() { println("4") } } // ok!
  val x4: T = new { def hello(): Unit = { println("4") } }        // error!
  x4.hello()
  // more..
}