Corrected test data
This commit is contained in:
+3
-3
@@ -23,6 +23,6 @@ import p.*
|
||||
open class K0 : Foo()
|
||||
|
||||
class K : K0() {
|
||||
// We keep this test to make sure ACCIDENTAL_OVERRIDE is not reported
|
||||
<!VIRTUAL_MEMBER_HIDDEN!>fun <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>foo<!>(f: () -> Unit)<!> {}
|
||||
}
|
||||
<!VIRTUAL_MEMBER_HIDDEN!>// We keep this test to make sure ACCIDENTAL_OVERRIDE is not reported
|
||||
fun <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>foo<!>(f: () -> Unit)<!> {}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package abstract
|
||||
|
||||
class MyClass() {
|
||||
//properties
|
||||
|
||||
<error>val a: Int</error>
|
||||
val a1: Int = 1
|
||||
<error>abstract</error> val a2: Int
|
||||
@@ -23,6 +24,7 @@ class MyClass() {
|
||||
<error>abstract</error> val e3: Int = 0; get() = a
|
||||
|
||||
//methods
|
||||
|
||||
<error>fun f()</error>
|
||||
fun g() {}
|
||||
<error>abstract</error> fun h()
|
||||
@@ -31,6 +33,7 @@ class MyClass() {
|
||||
|
||||
abstract class MyAbstractClass() {
|
||||
//properties
|
||||
|
||||
<error>val a: Int</error>
|
||||
val a1: Int = 1
|
||||
abstract val a2: Int
|
||||
@@ -52,6 +55,7 @@ abstract class MyAbstractClass() {
|
||||
abstract val e3: Int = <error>0</error>; <error>get() = a</error>
|
||||
|
||||
//methods
|
||||
|
||||
<error>fun f()</error>
|
||||
fun g() {}
|
||||
abstract fun h()
|
||||
@@ -60,6 +64,7 @@ abstract class MyAbstractClass() {
|
||||
|
||||
trait MyTrait {
|
||||
//properties
|
||||
|
||||
val a: Int
|
||||
val a1: Int = <error>1</error>
|
||||
<warning>abstract</warning> val a2: Int
|
||||
@@ -81,6 +86,7 @@ trait MyTrait {
|
||||
<warning>abstract</warning> val e3: Int = <error>0</error>; <error>get() = a</error>
|
||||
|
||||
//methods
|
||||
|
||||
fun f()
|
||||
fun g() {}
|
||||
<warning>abstract</warning> fun h()
|
||||
@@ -89,6 +95,7 @@ trait MyTrait {
|
||||
|
||||
enum class MyEnum() {
|
||||
//properties
|
||||
|
||||
<error>val a: Int</error>
|
||||
val a1: Int = 1
|
||||
abstract val a2: Int
|
||||
@@ -110,6 +117,7 @@ enum class MyEnum() {
|
||||
abstract val e3: Int = <error>0</error>; <error>get() = a</error>
|
||||
|
||||
//methods
|
||||
|
||||
<error>fun f()</error>
|
||||
fun g() {}
|
||||
abstract fun h()
|
||||
@@ -119,6 +127,7 @@ enum class MyEnum() {
|
||||
<error>abstract</error> enum class MyAbstractEnum() {}
|
||||
|
||||
//properties
|
||||
|
||||
<error>val a: Int</error>
|
||||
val a1: Int = 1
|
||||
<error><error>abstract</error> val a2: Int</error>
|
||||
@@ -140,6 +149,7 @@ val e1: Int = <error>0</error>; get() = a
|
||||
<error>abstract</error> val e3: Int = <error>0</error>; get() = a
|
||||
|
||||
//methods
|
||||
|
||||
<error>fun f()</error>
|
||||
fun g() {}
|
||||
<error>abstract</error> fun h()
|
||||
|
||||
@@ -16,7 +16,8 @@ class B() {
|
||||
object b {
|
||||
<error>class object {
|
||||
val x = 1
|
||||
}</error> // error
|
||||
}</error>
|
||||
// error
|
||||
}
|
||||
|
||||
val a = A.x
|
||||
|
||||
@@ -21,6 +21,7 @@ public fun Int.extFun1() {
|
||||
public
|
||||
fun Int.extFun2() {
|
||||
}
|
||||
|
||||
//-----------------------
|
||||
val fooVal1 = 1
|
||||
|
||||
@@ -41,8 +42,10 @@ public var Int.extVar1: Int = 122
|
||||
public
|
||||
var
|
||||
Int.extVar: Int = 1
|
||||
|
||||
//-----------------------
|
||||
annotation class A1
|
||||
|
||||
annotation class A2
|
||||
|
||||
private [A1 A2 A1] A1 A2 [A1 A2 A2] [A1] val fooProp1 = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo(n: Int) {
|
||||
// foo3
|
||||
<caret>val /* foo */ x: String = "" // bar3
|
||||
<caret>val /* foo */ x: String = "" // foo2 // bar3
|
||||
/* baz */
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fun foo(n: Int) {
|
||||
// foo3
|
||||
<caret>val /* foo */ x: String = "" // bar3
|
||||
<caret>val /* foo */ x: String = "" // foo2 // bar3
|
||||
/* baz */
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Create function 'set' from usage" "true"
|
||||
|
||||
import java.util.ArrayList
|
||||
|
||||
class Foo<T> {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Create function 'set' from usage" "true"
|
||||
|
||||
class Foo<T> {
|
||||
fun <T> x (y: Any, w: java.util.ArrayList<T>) {
|
||||
y<caret>["", w] = w
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Change getter type to Module" "true"
|
||||
|
||||
import kotlin.modules.Module
|
||||
|
||||
class A() {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Change getter type to Module" "true"
|
||||
|
||||
class A() {
|
||||
val i: kotlin.modules.Module
|
||||
get(): <caret>Any = kotlin.modules.ModuleBuilder("", "")
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Change type from 'String' to '(ModuleBuilder) -> Module'" "true"
|
||||
|
||||
import kotlin.modules.ModuleBuilder
|
||||
import kotlin.modules.Module
|
||||
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Change 'bar' function return type to 'Module'" "true"
|
||||
|
||||
import kotlin.modules.Module
|
||||
|
||||
fun bar(): Module = kotlin.modules.ModuleBuilder("", "")
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Change type from 'String' to 'Module'" "true"
|
||||
|
||||
import kotlin.modules.Module
|
||||
|
||||
fun foo(f: (Module) -> String) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Change 'f' type to '(Delegates) -> Unit'" "true"
|
||||
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
fun foo() {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Change type from 'String' to '(ModuleBuilder) -> Module'" "true"
|
||||
|
||||
fun foo(f: ((kotlin.modules.ModuleBuilder) -> kotlin.modules.Module) -> String) {
|
||||
foo {
|
||||
(f: String<caret>) -> "42"
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// "Change 'bar' function return type to 'Module'" "true"
|
||||
|
||||
fun bar(): Any = kotlin.modules.ModuleBuilder("", "")
|
||||
fun foo(): kotlin.modules.Module = bar(<caret>)
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "Change type from 'String' to 'Module'" "true"
|
||||
|
||||
fun foo(f: (kotlin.modules.Module) -> String) {
|
||||
foo {
|
||||
(x: String<caret>) -> ""
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// "Change 'f' type to '(Delegates) -> Unit'" "true"
|
||||
|
||||
fun foo() {
|
||||
var f: Int = { (x: kotlin.properties.Delegates) -> }<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user