deprecate required classes for traits
This commit is contained in:
committed by
Andrey Breslav
parent
7b0f6018dc
commit
900a16a315
@@ -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 {}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user