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