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
@@ -1,6 +1,6 @@
open class Required
trait Trait : Required
trait Trait : <!TRAIT_WITH_SUPERCLASS!>Required<!>
abstract <!UNMET_TRAIT_REQUIREMENT!>class Abstract<!> : Trait
@@ -1,6 +1,6 @@
open class Required
trait A : Required
trait A : <!TRAIT_WITH_SUPERCLASS!>Required<!>
val a = <!UNMET_TRAIT_REQUIREMENT!>object<!> : A {}
val b: A = object : A, Required() {}
@@ -1,8 +1,8 @@
open class Generic<T>
trait A : Generic<Int>
trait A : <!TRAIT_WITH_SUPERCLASS!>Generic<Int><!>
trait B : Generic<String>
trait B : <!TRAIT_WITH_SUPERCLASS!>Generic<String><!>
<!UNMET_TRAIT_REQUIREMENT, UNMET_TRAIT_REQUIREMENT!>class Y<!> : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>A, B<!>
class Z : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>A, B, Generic<Int>()<!>
@@ -1,7 +1,7 @@
open class Base {
}
trait Derived: Base {
trait Derived: <!TRAIT_WITH_SUPERCLASS!>Base<!> {
fun foo() {
f1(this@Derived)
}
@@ -1,4 +1,4 @@
open class A
open class B
trait C : A, <!MANY_CLASSES_IN_SUPERTYPE_LIST!>B<!>
trait C : <!TRAIT_WITH_SUPERCLASS!>A<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST!>B<!>
@@ -1,12 +1,12 @@
open class Required
trait A : Required
trait A : <!TRAIT_WITH_SUPERCLASS!>Required<!>
trait B : A, Required
trait B : A, <!TRAIT_WITH_SUPERCLASS!>Required<!>
trait C : Required
trait C : <!TRAIT_WITH_SUPERCLASS!>Required<!>
trait D : B, Required
trait D : B, <!TRAIT_WITH_SUPERCLASS!>Required<!>
<!UNMET_TRAIT_REQUIREMENT, UNMET_TRAIT_REQUIREMENT, UNMET_TRAIT_REQUIREMENT!>class W<!> : D
class X : D, Required()
@@ -1,6 +1,6 @@
open class RequiredBase
trait Trait : RequiredBase
trait Trait : <!TRAIT_WITH_SUPERCLASS!>RequiredBase<!>
open class RequiredDerived : RequiredBase()
@@ -1,6 +1,6 @@
open class Required(val value: String)
trait First : Required
trait First : <!TRAIT_WITH_SUPERCLASS!>Required<!>
trait Second : First
@@ -1,4 +1,4 @@
trait AnyTrait : Any
trait AnyTrait : <!TRAIT_WITH_SUPERCLASS!>Any<!>
class Foo : AnyTrait
@@ -1,9 +1,9 @@
open class bar()
trait Foo<!CONSTRUCTOR_IN_TRAIT!>()<!> : bar<!SUPERTYPE_INITIALIZED_IN_TRAIT!>()<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!> {
trait Foo<!CONSTRUCTOR_IN_TRAIT!>()<!> : <!TRAIT_WITH_SUPERCLASS!>bar<!><!SUPERTYPE_INITIALIZED_IN_TRAIT!>()<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!> {
}
trait Foo2 : bar, Foo {
trait Foo2 : <!TRAIT_WITH_SUPERCLASS!>bar<!>, Foo {
}
open class Foo1() : bar(), <!SUPERTYPE_NOT_INITIALIZED, MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_APPEARS_TWICE!>bar<!>, Foo, <!SUPERTYPE_APPEARS_TWICE!>Foo<!><!NO_CONSTRUCTOR!>()<!> {}
@@ -1,7 +1,7 @@
open class Generic<T>
trait A : Generic<String>
trait A : <!TRAIT_WITH_SUPERCLASS!>Generic<String><!>
trait B : Generic<Int>
trait B : <!TRAIT_WITH_SUPERCLASS!>Generic<Int><!>
trait C : <!INCONSISTENT_TYPE_PARAMETER_VALUES!>A, B<!>