Added correctness check of test data + fixed huge amount of incorrect code in test data
This commit is contained in:
@@ -6,7 +6,7 @@ interface I {
|
||||
|
||||
class C1 : I {
|
||||
override fun Int.foo(p: Any) {
|
||||
println(p) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
val v = p // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
4 fun Int.foo(<bold>p: Any</bold>)
|
||||
3 public void foo(int receiver, Object <bold>p</bold>) {
|
||||
4 System.out.println(<bold>p</bold>);
|
||||
9 println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 val v = <bold>p</bold> // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 val <bold>v = p // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958</bold>
|
||||
8 override fun Int.foo(<bold>p: Any</bold>) {
|
||||
9 DUPLICATE: println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 DUPLICATE: val v = <bold>p</bold> // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
|
||||
@@ -6,6 +6,6 @@ interface I {
|
||||
|
||||
class C : I {
|
||||
override fun foo(p: Any) {
|
||||
println(p)
|
||||
val v = p
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
4 fun foo(<bold>p: Any</bold>)
|
||||
8 override fun foo(<bold>p: Any</bold>) {
|
||||
9 println(<bold>p</bold>)
|
||||
9 val v = <bold>p</bold>
|
||||
9 val <bold>v = p</bold>
|
||||
|
||||
@@ -6,7 +6,7 @@ interface I {
|
||||
|
||||
class C : I {
|
||||
override fun foo(p: Any) {
|
||||
println(p) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
val v = p // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
4 fun foo(<bold>p: Any</bold>)
|
||||
2 public void foo(Object <bold>p</bold>) {
|
||||
3 System.out.println(<bold>p</bold>);
|
||||
9 println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 val v = <bold>p</bold> // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 val <bold>v = p // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958</bold>
|
||||
8 override fun foo(<bold>p: Any</bold>) {
|
||||
9 DUPLICATE: println(<bold>p</bold>) // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
9 DUPLICATE: val v = <bold>p</bold> // this usage will be shown twice due to bug in Java implementation: https://youtrack.jetbrains.com/issue/IDEA-236958
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// FLOW: OUT
|
||||
|
||||
class D : B(), C {
|
||||
internal class D : B(), C {
|
||||
override fun foo() = <caret>4
|
||||
}
|
||||
|
||||
fun test(a: A, b: B, c: C, d: D) {
|
||||
internal fun test(a: A, b: B, c: C, d: D) {
|
||||
val x = a.foo()
|
||||
val y = b.foo()
|
||||
val z = c.foo()
|
||||
|
||||
@@ -4,7 +4,7 @@ open class B : A {
|
||||
override fun foo() = <caret>2
|
||||
}
|
||||
|
||||
fun test(a: A, b: B, c: C, d: D) {
|
||||
internal fun test(a: A, b: B, c: C, d: D) {
|
||||
val x = a.foo()
|
||||
val y = b.foo()
|
||||
val z = c.foo()
|
||||
|
||||
@@ -2,7 +2,7 @@ interface A {
|
||||
public int foo();
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
class B implements A {
|
||||
public int foo() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// FLOW: OUT
|
||||
|
||||
interface C : A {
|
||||
internal interface C : A {
|
||||
override fun foo() = <caret>3
|
||||
}
|
||||
|
||||
fun test(a: A, b: B, c: C, d: D) {
|
||||
internal fun test(a: A, b: B, c: C, d: D) {
|
||||
val x = a.foo()
|
||||
val y = b.foo()
|
||||
val z = c.foo()
|
||||
|
||||
@@ -5,7 +5,9 @@ class A
|
||||
|
||||
operator fun A.get(i: Int) = this
|
||||
operator fun A.set(i: Int, a: A) = this
|
||||
operator fun A.plusAssign(a: A) = this
|
||||
operator fun A.plusAssign(a: A) {
|
||||
val v = this
|
||||
}
|
||||
operator fun A.times(a: A) = this
|
||||
operator fun A.inc() = this
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
13 val <bold>x = A()</bold>
|
||||
16 <bold>x</bold>[1]
|
||||
17 <bold>x</bold>[1] = y
|
||||
18 <bold>x</bold>[1] += y
|
||||
19 <bold>x</bold>[1] *= y
|
||||
20 <bold>x</bold>[1]++
|
||||
15 val <bold>x = A()</bold>
|
||||
18 <bold>x</bold>[1]
|
||||
19 <bold>x</bold>[1] = y
|
||||
20 <bold>x</bold>[1] += y
|
||||
21 <bold>x</bold>[1] *= y
|
||||
22 <bold>x</bold>[1]++
|
||||
|
||||
+1
-1
@@ -4,6 +4,6 @@ fun f1(param: String) {}
|
||||
|
||||
fun f4(list: List<String>) {
|
||||
for (<caret>s in list)
|
||||
if (s.isNotEmpty())
|
||||
if (s.length == 0)
|
||||
f1(s)
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
6 for (<bold>s</bold> in list)
|
||||
7 if (<bold>s</bold>.isNotEmpty())
|
||||
7 if (<bold>s</bold>.length == 0)
|
||||
8 f1(<bold>s</bold>)
|
||||
3 fun f1(<bold>param: String</bold>) {}
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@
|
||||
class A {
|
||||
operator fun get(i: Int) = this
|
||||
operator fun set(i: Int, a: A) = this
|
||||
operator fun plusAssign(a: A) = this
|
||||
operator fun plusAssign(a: A) {
|
||||
val v = a
|
||||
}
|
||||
operator fun times(a: A) = this
|
||||
operator fun inc() = this
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
13 val <bold>x = A()</bold>
|
||||
16 DEREFERENCE: <bold>x</bold>[1]
|
||||
17 DEREFERENCE: <bold>x</bold>[1] = y
|
||||
18 DEREFERENCE: <bold>x</bold>[1] += y
|
||||
19 DEREFERENCE: <bold>x</bold>[1] *= y
|
||||
20 DEREFERENCE: <bold>x</bold>[1]++
|
||||
15 val <bold>x = A()</bold>
|
||||
18 DEREFERENCE: <bold>x</bold>[1]
|
||||
19 DEREFERENCE: <bold>x</bold>[1] = y
|
||||
20 DEREFERENCE: <bold>x</bold>[1] += y
|
||||
21 DEREFERENCE: <bold>x</bold>[1] *= y
|
||||
22 DEREFERENCE: <bold>x</bold>[1]++
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// FLOW: OUT
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A {
|
||||
@JvmField val <caret>x = 1
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
4 @JvmField val <bold>x = 1</bold>
|
||||
5 @JvmField val <bold>x = 1</bold>
|
||||
3 int x = new A().<bold>x</bold>;
|
||||
3 int <bold>x = new A().x;</bold>
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
// FLOW: OUT
|
||||
|
||||
open class C {
|
||||
open fun foo(<caret>p: Any) {
|
||||
println(p)
|
||||
open fun foo(<caret>p: String) {
|
||||
val v = p
|
||||
}
|
||||
}
|
||||
|
||||
class D : C() {
|
||||
override fun foo(p: Any) {
|
||||
println(p + 1)
|
||||
override fun foo(p: String) {
|
||||
val v = p + 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
4 open fun foo(<bold>p: Any</bold>) {
|
||||
5 println(<bold>p</bold>)
|
||||
10 override fun foo(<bold>p: Any</bold>) {
|
||||
11 println(<bold>p</bold> + 1)
|
||||
4 open fun foo(<bold>p: String</bold>) {
|
||||
5 val v = <bold>p</bold>
|
||||
5 val <bold>v = p</bold>
|
||||
10 override fun foo(<bold>p: String</bold>) {
|
||||
11 val v = <bold>p</bold> + 1
|
||||
|
||||
@@ -5,13 +5,17 @@ class A {
|
||||
operator fun plus(n: Int) = this
|
||||
operator fun unaryPlus() = this
|
||||
operator fun inc() = this
|
||||
operator fun timesAssign(n: Int) = this
|
||||
operator fun timesAssign(n: Int) {
|
||||
val v = this
|
||||
}
|
||||
}
|
||||
|
||||
operator fun A.minus(n: Int) = this
|
||||
operator fun A.unaryMinus() = this
|
||||
operator fun A.dec() = this
|
||||
operator fun A.divAssign(n: Int) = this
|
||||
operator fun A.divAssign(n: Int) {
|
||||
val v = this
|
||||
}
|
||||
|
||||
fun test() {
|
||||
var <caret>x = A()
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
17 var <bold>x = A()</bold>
|
||||
19 DEREFERENCE: +<bold>x</bold>
|
||||
20 DEREFERENCE: <bold>x</bold> + 1
|
||||
21 DEREFERENCE: <bold>x</bold>++
|
||||
22 DEREFERENCE: <bold>x</bold> += 1
|
||||
23 DEREFERENCE: <bold>x</bold> *= 1
|
||||
25 -<bold>x</bold>
|
||||
12 operator fun <bold>A</bold>.unaryMinus() = this
|
||||
12 operator fun A.unaryMinus() = <bold>this</bold>
|
||||
12 operator fun A.<bold>unaryMinus() = this</bold>
|
||||
25 <bold>-x</bold>
|
||||
26 <bold>x</bold> - 1
|
||||
11 operator fun <bold>A</bold>.minus(n: Int) = this
|
||||
11 operator fun A.minus(n: Int) = <bold>this</bold>
|
||||
11 operator fun A.<bold>minus(n: Int) = this</bold>
|
||||
26 <bold>x - 1</bold>
|
||||
28 <bold>x -= 1</bold>
|
||||
17 DUPLICATE: var <bold>x = A()</bold>
|
||||
29 <bold>x</bold> /= 1
|
||||
14 operator fun <bold>A</bold>.divAssign(n: Int) = this
|
||||
14 operator fun A.divAssign(n: Int) = <bold>this</bold>
|
||||
14 operator fun A.<bold>divAssign(n: Int) = this</bold>
|
||||
21 var <bold>x = A()</bold>
|
||||
23 DEREFERENCE: +<bold>x</bold>
|
||||
24 DEREFERENCE: <bold>x</bold> + 1
|
||||
25 DEREFERENCE: <bold>x</bold>++
|
||||
26 DEREFERENCE: <bold>x</bold> += 1
|
||||
27 DEREFERENCE: <bold>x</bold> *= 1
|
||||
29 -<bold>x</bold>
|
||||
14 operator fun <bold>A</bold>.unaryMinus() = this
|
||||
14 operator fun A.unaryMinus() = <bold>this</bold>
|
||||
14 operator fun A.<bold>unaryMinus() = this</bold>
|
||||
29 <bold>-x</bold>
|
||||
30 <bold>x</bold> - 1
|
||||
13 operator fun <bold>A</bold>.minus(n: Int) = this
|
||||
13 operator fun A.minus(n: Int) = <bold>this</bold>
|
||||
13 operator fun A.<bold>minus(n: Int) = this</bold>
|
||||
30 <bold>x - 1</bold>
|
||||
32 <bold>x -= 1</bold>
|
||||
21 DUPLICATE: var <bold>x = A()</bold>
|
||||
33 <bold>x</bold> /= 1
|
||||
16 operator fun <bold>A</bold>.divAssign(n: Int) {
|
||||
17 val v = <bold>this</bold>
|
||||
17 val <bold>v = this</bold>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
class A {
|
||||
int foo() {
|
||||
public int foo() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
int foo() {
|
||||
public int foo() {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
// FLOW: OUT
|
||||
|
||||
open class B : A() {
|
||||
internal open class B : A() {
|
||||
override fun foo() = <caret>2
|
||||
}
|
||||
|
||||
fun test(a: A, b: B, c: C) {
|
||||
internal fun test(a: A, b: B, c: C) {
|
||||
val x = a.foo()
|
||||
val y = b.foo()
|
||||
val z = c.foo()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
4 override fun foo() = <bold>2</bold>
|
||||
4 override fun <bold>foo() = 2</bold>
|
||||
2 int <bold>foo() {</bold>
|
||||
2 public int <bold>foo() {</bold>
|
||||
8 val x = a.<bold>foo()</bold>
|
||||
8 val <bold>x = a.foo()</bold>
|
||||
9 val y = b.<bold>foo()</bold>
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ open class A() {
|
||||
|
||||
open class B(override val foo: Int) : A()
|
||||
|
||||
class C : B() {
|
||||
class C : B(1) {
|
||||
override val foo = <caret>3
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
// FLOW: OUT
|
||||
// WITH_RUNTIME
|
||||
|
||||
val <caret>x = 1
|
||||
|
||||
@@ -9,7 +10,7 @@ fun test() {
|
||||
|
||||
val z: Int
|
||||
|
||||
init {
|
||||
run {
|
||||
z = x
|
||||
|
||||
bar(x)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
3 val <bold>x = 1</bold>
|
||||
5 val y = <bold>x</bold>
|
||||
5 val <bold>y = x</bold>
|
||||
4 val <bold>x = 1</bold>
|
||||
3 int x = TopLevelPropertyUsagesKt.<bold>getX</bold>();
|
||||
8 val y = <bold>x</bold>
|
||||
8 val <bold>y = x</bold>
|
||||
13 z = <bold>x</bold>
|
||||
10 val <bold>z: Int</bold>
|
||||
15 bar(<bold>x</bold>)
|
||||
19 fun bar(<bold>m: Int</bold>) {
|
||||
6 val y = <bold>x</bold>
|
||||
6 val <bold>y = x</bold>
|
||||
9 val y = <bold>x</bold>
|
||||
9 val <bold>y = x</bold>
|
||||
14 z = <bold>x</bold>
|
||||
11 val <bold>z: Int</bold>
|
||||
16 bar(<bold>x</bold>)
|
||||
20 fun bar(<bold>m: Int</bold>) {
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ fun f1(param: String){
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val <caret>hello = "Hello"
|
||||
println("hello = $hello")
|
||||
val v = "hello = $hello"
|
||||
f1(hello)
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
8 val <bold>hello = "Hello"</bold>
|
||||
9 println("hello = $<bold>hello</bold>")
|
||||
9 val v = "hello = $<bold>hello</bold>"
|
||||
10 f1(<bold>hello</bold>)
|
||||
3 fun f1(<bold>param: String</bold>){
|
||||
4 val a = "param = $<bold>param</bold>"
|
||||
|
||||
+1
-4
@@ -1,4 +1,5 @@
|
||||
// FLOW: OUT
|
||||
// WITH_RUNTIME
|
||||
|
||||
class C {
|
||||
fun String.extensionFun(): Any {
|
||||
@@ -13,7 +14,3 @@ class C {
|
||||
val x = <caret>"".extensionFun()
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <T, R> with(receiver: T, block: T.() -> R): R {
|
||||
return receiver.block()
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,3 +1,3 @@
|
||||
13 val x = <bold>""</bold>.extensionFun()
|
||||
4 fun <bold>String</bold>.extensionFun(): Any {
|
||||
7 println(<bold>this@extensionFun</bold>.length)
|
||||
14 val x = <bold>""</bold>.extensionFun()
|
||||
5 fun <bold>String</bold>.extensionFun(): Any {
|
||||
8 println(<bold>this@extensionFun</bold>.length)
|
||||
|
||||
Reference in New Issue
Block a user