compiler testdata: s/trait/interface
This commit is contained in:
@@ -56,7 +56,7 @@ class K : H() {
|
||||
}
|
||||
|
||||
//-------------
|
||||
trait T {
|
||||
interface T {
|
||||
public fun foo() {}
|
||||
}
|
||||
|
||||
@@ -68,15 +68,15 @@ class M : L() {
|
||||
<!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>internal<!> override fun foo() {}
|
||||
}
|
||||
//---------------
|
||||
trait R {
|
||||
interface R {
|
||||
<!INCOMPATIBLE_MODIFIERS!>internal<!> <!INCOMPATIBLE_MODIFIERS!>protected<!> fun foo() {}
|
||||
}
|
||||
|
||||
trait P : R {
|
||||
interface P : R {
|
||||
<!CANNOT_CHANGE_ACCESS_PRIVILEGE!>internal<!> override fun foo() {}
|
||||
}
|
||||
|
||||
trait Q : R {
|
||||
interface Q : R {
|
||||
protected override fun foo() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//KT-1248 Control visibility of overrides needed
|
||||
package kt1248
|
||||
|
||||
trait ParseResult<out T> {
|
||||
interface ParseResult<out T> {
|
||||
public val success : Boolean
|
||||
public val value : T
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ open class C {
|
||||
internal open fun foo() {}
|
||||
}
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//FILE:a.kt
|
||||
//KT-1579 Can't import nested class/trait
|
||||
//KT-1579 Can't import nested class/interface
|
||||
package lib
|
||||
trait WithInner {
|
||||
trait Inner {
|
||||
interface WithInner {
|
||||
interface Inner {
|
||||
}
|
||||
}
|
||||
//FILE:b.kt
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//FILE:a.kt
|
||||
//KT-1580 Can't access nested class/trait from other package
|
||||
//KT-1580 Can't access nested class/interface from other package
|
||||
package lib
|
||||
trait WithInner {
|
||||
trait Inner {
|
||||
interface WithInner {
|
||||
interface Inner {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ open class C {
|
||||
internal open fun foo() {}
|
||||
}
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ open class A {
|
||||
internal open fun foo() {}
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
protected fun foo() {}
|
||||
}
|
||||
|
||||
trait D {
|
||||
interface D {
|
||||
public fun foo() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package c
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
package test_visibility
|
||||
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> class ProtectedClass
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> trait ProtectedTrait
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> interface ProtectedTrait
|
||||
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> val protected_val : Int = 4
|
||||
<!PACKAGE_MEMBER_CANNOT_BE_PROTECTED!>protected<!> fun protected_fun() {}
|
||||
@@ -42,7 +42,7 @@ fun test3(a: A) {
|
||||
a.<!INVISIBLE_MEMBER!>f<!>(0, <!TOO_MANY_ARGUMENTS!>1<!>) //todo .bMethod()
|
||||
}
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
open class C : T {
|
||||
protected var i : Int = 34
|
||||
|
||||
Reference in New Issue
Block a user