deprecate required classes for traits

This commit is contained in:
Dmitry Jemerov
2015-04-10 18:04:45 +02:00
committed by Andrey Breslav
parent 7b0f6018dc
commit 900a16a315
31 changed files with 74 additions and 62 deletions
+3 -3
View File
@@ -24,11 +24,11 @@ trait T2<T> {}
trait Test<error>()</error> {
}
trait Test1 : C2<error>()</error> {}
trait Test1 : <warning>C2</warning><error>()</error> {}
trait Test2 : C2 {}
trait Test2 : <warning>C2</warning> {}
trait Test3 : C2, <error>C3</error> {}
trait Test3 : <warning>C2</warning>, <error>C3</error> {}
trait Test4 : T1 {}
+2 -2
View File
@@ -1,9 +1,9 @@
open class bar()
trait Foo<error>()</error> : bar<error>()</error>, <error>bar</error>, <error>bar</error> {
trait Foo<error>()</error> : <warning>bar</warning><error>()</error>, <error><error>bar</error></error>, <error><error>bar</error></error> {
}
trait Foo2 : bar, Foo {
trait Foo2 : <warning>bar</warning>, Foo {
}
open class Foo1() : bar(), <error>bar</error>, Foo, <error>Foo</error><error>()</error> {}
@@ -1,14 +1,14 @@
open class Base {
}
trait Derived: Base {
trait Derived: <warning>Base</warning> {
fun foo() {
f1(this@Derived)
}
}
<error descr="[UNMET_TRAIT_REQUIREMENT] Super trait 'Derived' requires subclasses to extend 'Base'">class DerivedImpl</error>(): Derived {}
<error descr="[UNMET_TRAIT_REQUIREMENT] Super trait 'Derived' requires subclasses to extend 'Base'">object ObjectImpl</error>: Derived {}
<error>class DerivedImpl</error>(): Derived {}
<error>object ObjectImpl</error>: Derived {}
fun f1(b: Base) = b