IDE testdata: s/trait/interface
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: CANNOT_INFER_VISIBILITY
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
internal val foo: String
|
||||
}
|
||||
|
||||
trait U {
|
||||
interface U {
|
||||
protected val foo: String
|
||||
}
|
||||
|
||||
trait V : T, U
|
||||
interface V : T, U
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: DIFFERENT_NAMES_FOR_THE_SAME_PARAMETER_IN_SUPERTYPES
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
fun foo(x: Int)
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun foo(y: Int) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// !DIAGNOSTICS_NUMBER: 1
|
||||
// !DIAGNOSTICS: MULTIPLE_DEFAULTS_INHERITED_FROM_SUPERTYPES_WHEN_NO_EXPLICIT_OVERRIDE
|
||||
|
||||
trait C {
|
||||
interface C {
|
||||
fun foo(x: Int = 42)
|
||||
}
|
||||
|
||||
trait D {
|
||||
interface D {
|
||||
fun foo(x: Int = 239) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package b
|
||||
|
||||
trait A<T>
|
||||
interface A<T>
|
||||
|
||||
fun infer<T>(a: A<T>) : T {}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ fun test2(a: Any, s: MutableSet<String>) {
|
||||
}
|
||||
|
||||
//--------------
|
||||
trait A
|
||||
interface A
|
||||
class B
|
||||
|
||||
fun baz<T: R, R: B>(t: T, r: R) where T: A {
|
||||
|
||||
@@ -2,21 +2,21 @@
|
||||
// !DIAGNOSTICS: ABSTRACT_MEMBER_NOT_IMPLEMENTED
|
||||
// !MESSAGE_TYPE: TEXT
|
||||
|
||||
trait T1
|
||||
trait T2 : T1
|
||||
trait T3 : T2
|
||||
trait T4 : T3
|
||||
interface T1
|
||||
interface T2 : T1
|
||||
interface T3 : T2
|
||||
interface T4 : T3
|
||||
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(): T1
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun f(): T2 = null!!
|
||||
}
|
||||
|
||||
trait C {
|
||||
interface C {
|
||||
fun f(): T3
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user