IDE testdata: s/trait/interface
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'abstract' modifier" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
<caret>abstract fun foo()
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove redundant 'abstract' modifier" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
<caret>fun foo()
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
// ACTION: Implement members
|
||||
// ACTION: Split property declaration
|
||||
// ERROR: <html>Object must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo(): kotlin.Unit <i>defined in</i> T</html>
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.div
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h / 3
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h <caret>/ 3
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
[suppress("UNUSED_CHANGED_VALUE")]
|
||||
fun f(h: H?) {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package importTrait.data
|
||||
|
||||
trait TestTrait
|
||||
interface TestTrait
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.foo
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h foo h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h <caret>foo h
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.minus
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h - "other"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h <caret>- "other"
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.plus
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h + "other"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
h <caret>+ "other"
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.inc
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
var h1 = h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
var h1 = h
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.timesAssign
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h *= 3
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H) {
|
||||
h <caret>*= 3
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.minus
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
-h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
<caret>-h
|
||||
|
||||
@@ -5,7 +5,7 @@ package h
|
||||
|
||||
import util.plus
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
+h
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package h
|
||||
|
||||
trait H
|
||||
interface H
|
||||
|
||||
fun f(h: H?) {
|
||||
<caret>+h
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun f()
|
||||
}
|
||||
|
||||
trait ZZ {
|
||||
interface ZZ {
|
||||
fun f()
|
||||
}
|
||||
|
||||
trait ZZZ: Z, ZZ {
|
||||
interface ZZZ: Z, ZZ {
|
||||
}
|
||||
|
||||
trait ZZZZ : ZZZ {
|
||||
interface ZZZZ : ZZZ {
|
||||
override fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun f(i: Int)
|
||||
}
|
||||
|
||||
trait ZZ {
|
||||
interface ZZ {
|
||||
fun f(i: Int)
|
||||
}
|
||||
|
||||
trait ZZZ: Z, ZZ {
|
||||
interface ZZZ: Z, ZZ {
|
||||
}
|
||||
|
||||
trait ZZZZ : ZZZ {
|
||||
interface ZZZZ : ZZZ {
|
||||
override fun f(i: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int) {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f(a: Int, i: Int)
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int, i: Int)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f(a: Int, i: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int, i: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int, i: Int) {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f(a: Int, i: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f(a: Int, i: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Remove parameter 'a'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int) {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Remove parameter 'a'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f()
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f()
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f() {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f() {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f() {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int) {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait OA {
|
||||
interface OA {
|
||||
fun f(a: Int, s: String)
|
||||
}
|
||||
|
||||
trait OB {
|
||||
interface OB {
|
||||
fun f(a: Int, s: String)
|
||||
}
|
||||
|
||||
trait O : OA, OB {
|
||||
interface O : OA, OB {
|
||||
override fun f(a: Int, s: String)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int, s: String) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int, s: String) {}
|
||||
}
|
||||
|
||||
trait OOOA : OOO {
|
||||
interface OOOA : OOO {
|
||||
override fun f(a: Int, s: String) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOOB : OOO {
|
||||
interface OOOB : OOO {
|
||||
override fun f(a: Int, s: String) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait O {
|
||||
interface O {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// "Add parameter to function 'f'" "true"
|
||||
trait O {
|
||||
interface O {
|
||||
fun f(a: Int, i: Int)
|
||||
}
|
||||
|
||||
trait OO : O {
|
||||
interface OO : O {
|
||||
override fun f(a: Int, i: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
trait OOO : OO {
|
||||
interface OOO : OO {
|
||||
override fun f(a: Int, i: Int) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// "class org.jetbrains.kotlin.idea.quickfix.RemoveFunctionParametersFix" "false"
|
||||
//ERROR: No value passed for parameter other
|
||||
|
||||
trait StringComparable {
|
||||
interface StringComparable {
|
||||
public fun compareTo(other: String): Int = 0
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// "Remove parameter 'i'" "true"
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun f(i: Int)
|
||||
}
|
||||
|
||||
trait ZZ {
|
||||
interface ZZ {
|
||||
fun f(i: Int)
|
||||
}
|
||||
|
||||
trait ZZZ: Z, ZZ {
|
||||
interface ZZZ: Z, ZZ {
|
||||
}
|
||||
|
||||
trait ZZZZ : ZZZ {
|
||||
interface ZZZZ : ZZZ {
|
||||
override fun f(i: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
// "Remove parameter 'i'" "true"
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun f()
|
||||
}
|
||||
|
||||
trait ZZ {
|
||||
interface ZZ {
|
||||
fun f()
|
||||
}
|
||||
|
||||
trait ZZZ: Z, ZZ {
|
||||
interface ZZZ: Z, ZZ {
|
||||
}
|
||||
|
||||
trait ZZZZ : ZZZ {
|
||||
interface ZZZZ : ZZZ {
|
||||
override fun f()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
|
||||
trait A
|
||||
interface A
|
||||
|
||||
fun test(): A = <caret>Foo(2, "2")
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
|
||||
trait A
|
||||
interface A
|
||||
|
||||
fun test(): A = Foo(2, "2")
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
fun test(): T = J.Foo(2, "2")
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create class 'Foo'" "true"
|
||||
// ERROR: Unresolved reference: Foo
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
fun test(): T = J.<caret>Foo(2, "2")
|
||||
+1
-1
@@ -3,6 +3,6 @@ package p
|
||||
|
||||
fun foo(): X = <caret>A
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
|
||||
}
|
||||
+1
-1
@@ -7,6 +7,6 @@ object A : X {
|
||||
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.<caret>foo("1", 2)
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create extension function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.foo("1", 2)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
fun test(t: T) {
|
||||
val b: Boolean = t.<caret>foo("1", 2)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Create function 'foo'" "true"
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
fun foo(s: String, i: Int): Boolean
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create secondary constructor" "true"
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
class A: T
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create secondary constructor" "true"
|
||||
|
||||
trait T
|
||||
interface T
|
||||
|
||||
class A: T {
|
||||
constructor(i: Int) {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create secondary constructor" "false"
|
||||
// ERROR: This class does not have a constructor
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
// "Create secondary constructor" "false"
|
||||
// ERROR: Too many arguments for public constructor Any() defined in kotlin.Any
|
||||
|
||||
trait T {
|
||||
interface T {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
// ACTION: Create property 'foo'
|
||||
// ERROR: Unresolved reference: foo
|
||||
|
||||
trait A {
|
||||
interface A {
|
||||
val test: Int get() {
|
||||
return <caret>foo
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Create parameter 'value'" "true"
|
||||
// DISABLE-ERRORS
|
||||
trait Tr {
|
||||
interface Tr {
|
||||
fun foo(value: String, b: String) = ""
|
||||
fun bar() = foo(<caret>value, b)
|
||||
}
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// "Create parameter 'value'" "true"
|
||||
// DISABLE-ERRORS
|
||||
trait Tr {
|
||||
interface Tr {
|
||||
fun foo(value: String, b: String) = ""
|
||||
fun bar(value: String) = foo(value, b)
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// "Make A open" "true"
|
||||
trait X {}
|
||||
trait Y {}
|
||||
interface X {}
|
||||
interface Y {}
|
||||
|
||||
class A {}
|
||||
class B : X, A<caret>(), Y {}
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
// "Make A open" "true"
|
||||
trait X {}
|
||||
trait Y {}
|
||||
interface X {}
|
||||
interface Y {}
|
||||
|
||||
open class A {}
|
||||
class B : X, A<caret>(), Y {}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Remove 'final' modifier" "true"
|
||||
<caret>final trait A {}
|
||||
<caret>final interface A {}
|
||||
@@ -1,2 +1,2 @@
|
||||
// "Remove 'final' modifier" "true"
|
||||
<caret>trait A {}
|
||||
<caret>interface A {}
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove 'enum' modifier" "true"
|
||||
<caret>enum trait A {
|
||||
<caret>enum interface A {
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove 'enum' modifier" "true"
|
||||
<caret>trait A {
|
||||
<caret>interface A {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'inner' modifier" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
inne<caret>r class B
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Remove 'inner' modifier" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
class B
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change visibility modifier" "true"
|
||||
trait ParseResult<out T> {
|
||||
interface ParseResult<out T> {
|
||||
public val success : Boolean
|
||||
public val value : T
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change visibility modifier" "true"
|
||||
trait ParseResult<out T> {
|
||||
interface ParseResult<out T> {
|
||||
public val success : Boolean
|
||||
public val value : T
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove '?'" "true"
|
||||
trait Foo {}
|
||||
interface Foo {}
|
||||
class Bar : Foo?<caret> {}
|
||||
@@ -1,3 +1,3 @@
|
||||
// "Remove '?'" "true"
|
||||
trait Foo {}
|
||||
interface Foo {}
|
||||
class Bar : Foo<caret> {}
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add 'open fun f()' to 'A'" "true"
|
||||
trait A
|
||||
interface A
|
||||
class B : A {
|
||||
<caret>override fun f() {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add 'open fun f()' to 'A'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
open fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add 'open fun f()' to 'A'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
}
|
||||
class B : A {
|
||||
<caret>override fun f() {}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Add 'open fun f()' to 'A'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
open fun f()
|
||||
}
|
||||
class B : A {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Add function to supertype..." "true"
|
||||
trait A {}
|
||||
trait B {}
|
||||
interface A {}
|
||||
interface B {}
|
||||
class C: A, B {
|
||||
<caret>override fun foo() {}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
// "Add function to supertype..." "true"
|
||||
trait A {
|
||||
interface A {
|
||||
open fun foo()
|
||||
}
|
||||
trait B {}
|
||||
interface B {}
|
||||
class C: A, B {
|
||||
<caret>override fun foo() {}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int, x: T)'" "true"
|
||||
trait A<R> {
|
||||
interface A<R> {
|
||||
fun f(a: Int, b: R)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int, x: T)'" "true"
|
||||
trait A<R> {
|
||||
interface A<R> {
|
||||
fun f(a: Int, b: R)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Change function signature..." "true"
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
fun f(a: String)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// "Change function signature..." "true"
|
||||
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: kotlin.String): kotlin.Unit <i>defined in</i> A</html>
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
fun f(a: String)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait B : A {
|
||||
interface B : A {
|
||||
}
|
||||
|
||||
class C : B {
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait B : A {
|
||||
interface B : A {
|
||||
}
|
||||
|
||||
class C : B {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait B : A {
|
||||
interface B : A {
|
||||
<caret>override fun f(a: String)
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
trait B : A {
|
||||
interface B : A {
|
||||
<caret>override fun f(a: Int)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(a: Int)'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f(a: Int)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f()'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f()'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// "Change function signature to 'fun f()'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f()
|
||||
}
|
||||
trait B {
|
||||
interface B {
|
||||
fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// "Change function signature to 'fun f()'" "true"
|
||||
trait A {
|
||||
interface A {
|
||||
fun f()
|
||||
}
|
||||
trait B {
|
||||
interface B {
|
||||
fun f()
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(y: S, x: List<Set<R>>)'" "true"
|
||||
trait A<P,Q> {
|
||||
interface A<P,Q> {
|
||||
fun f(a: Q, b: List<Set<P>>)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
// "Change function signature to 'fun f(y: S, x: List<Set<R>>)'" "true"
|
||||
trait A<P,Q> {
|
||||
interface A<P,Q> {
|
||||
fun f(a: Q, b: List<Set<P>>)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ open class A {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
final fun foo() {}
|
||||
}
|
||||
|
||||
trait Y {
|
||||
interface Y {
|
||||
final fun foo() {}
|
||||
}
|
||||
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ open class A {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
trait Y {
|
||||
interface Y {
|
||||
open fun foo() {}
|
||||
}
|
||||
|
||||
trait Z {
|
||||
interface Z {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// "Make XX.foo open" "true"
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
trait XX : X {
|
||||
interface XX : X {
|
||||
override final fun foo() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// "Make XX.foo open" "true"
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
trait XX : X {
|
||||
interface XX : X {
|
||||
override open fun foo() {
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// "Make XX.foo open" "true"
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
trait XX : X {
|
||||
interface XX : X {
|
||||
override final fun foo() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
trait Y : X, XX {
|
||||
interface Y : X, XX {
|
||||
}
|
||||
|
||||
class B() : Y {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
// "Make XX.foo open" "true"
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
trait XX : X {
|
||||
interface XX : X {
|
||||
override open fun foo() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
trait Y : X, XX {
|
||||
interface Y : X, XX {
|
||||
}
|
||||
|
||||
class B() : Y {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// ERROR: Cannot access '<init>': it is 'private' in 'E'
|
||||
// ERROR: 'ordinal' in 'E' is final and cannot be overridden
|
||||
enum class E {}
|
||||
trait X {
|
||||
interface X {
|
||||
final fun ordinal() : Int = 42
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo(agr: Int) : Int;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ abstract class A {
|
||||
abstract fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
trait X {
|
||||
interface X {
|
||||
fun foo(arg : Int) : Int;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -3,14 +3,14 @@
|
||||
// ACTION: Disable inspection
|
||||
// ACTION: Edit inspection profile setting
|
||||
// ERROR: <html>Return type is '(kotlin.Int) → kotlin.Int', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>val</b> x: (kotlin.String) → kotlin.Int <i>defined in</i> A</html>
|
||||
trait A {
|
||||
interface A {
|
||||
val x: (String) -> Int
|
||||
}
|
||||
|
||||
trait B {
|
||||
interface B {
|
||||
val x: (String) -> Any
|
||||
}
|
||||
|
||||
trait C : A, B {
|
||||
interface C : A, B {
|
||||
override val x: (Int) -> Int<caret>
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user