blob: a2ff38ef43dafb58ddb1b7105f66a21179a8c0e8 (
plain) (
tree)
|
|
abstract class AA
trait TT
class A { self: B =>
}
@scala.annotation.Annotation class C // error
class B extends A() {
}
object Test {
@scala.annotation.Annotation type T = String // error
@scala.annotation.Annotation val x = 1 // error
@scala.annotation.Annotation def f = 1 // error
(1: @scala.annotation.Annotation) // error
new AA // error
new TT // error
new A
// the following are OK in Typer but would be caught later in RefChecks
new A() {}
new AA() {}
object O extends A
object OO extends AA
}
// nopos-error: "A does not conform to its self type B; cannot be instantiated"
|