Minor. removed several tests with error calls.
This commit is contained in:
-106
@@ -1,106 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int): Int = x
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int): Int = x
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Int)
|
||||
magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
w(x|<v0>)
|
||||
r(x) -> <v1>
|
||||
ret(*|<v1>) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Int)
|
||||
magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
w(x|<v0>)
|
||||
v(y: Int)
|
||||
magic[FAKE_INITIALIZER](y: Int) -> <v1>
|
||||
w(y|<v1>)
|
||||
2 mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val get: Bar = Bar()
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(val get: Bar = Bar())
|
||||
mark(Bar())
|
||||
call(Bar(), <init>) -> <v0>
|
||||
w(get|<v0>)
|
||||
v(val set: Bar = Bar())
|
||||
mark(Bar())
|
||||
call(Bar(), <init>) -> <v1>
|
||||
w(set|<v1>)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test ==
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(foo: Foo)
|
||||
magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
w(foo|<v0>)
|
||||
2 mark({ foo[1] += 2 })
|
||||
mark(foo[1])
|
||||
r(foo) -> <v1>
|
||||
r(foo[1], get|<v1>) -> <v2>
|
||||
r(1) -> <v3>
|
||||
mark(foo[1])
|
||||
call(foo[1], invoke|<v2>, <v3>) -> <v4>
|
||||
r(2) -> <v5>
|
||||
mark(foo[1] += 2)
|
||||
call(foo[1] += 2, plus|<v4>, <v5>) -> <v6>
|
||||
r(foo) -> <v7>
|
||||
r(foo[1], set|<v7>) -> <v8>
|
||||
r(1) -> <v9>
|
||||
call(foo[1] += 2, invoke|<v8>, <v9>, <v6>) -> <v10>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -1,13 +0,0 @@
|
||||
class Bar {
|
||||
fun invoke(x: Int): Int = x
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val get: Bar = Bar()
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int): Int = x
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int): Int = x
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
x <v1>: Int NEW: r(x) -> <v1>
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
<v1>: Int NEW: magic[FAKE_INITIALIZER](y: Int) -> <v1>
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val get: Bar = Bar()
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
Bar() <v0>: Bar NEW: call(Bar(), <init>) -> <v0>
|
||||
Bar() <v1>: Bar NEW: call(Bar(), <init>) -> <v1>
|
||||
=====================
|
||||
== test ==
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
foo <v7>: Foo NEW: r(foo) -> <v7>
|
||||
1 <v9>: Int NEW: r(1) -> <v9>
|
||||
foo[1] <v8>: Bar NEW: r(foo[1], set|<v7>) -> <v8>
|
||||
2 <v5>: Int NEW: r(2) -> <v5>
|
||||
foo[1] += 2 <v10>: * NEW: call(foo[1] += 2, invoke|<v8>, <v9>, <v6>) -> <v10>
|
||||
{ foo[1] += 2 } <v10>: * COPY
|
||||
=====================
|
||||
-99
@@ -1,99 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Int)
|
||||
magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
w(x|<v0>)
|
||||
v(y: Int)
|
||||
magic[FAKE_INITIALIZER](y: Int) -> <v1>
|
||||
w(y|<v1>)
|
||||
2 mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(val set: Bar = Bar())
|
||||
mark(Bar())
|
||||
call(Bar(), <init>) -> <v0>
|
||||
w(set|<v0>)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== get ==
|
||||
fun Foo.get(x: Int): Int = x
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Int)
|
||||
magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
w(x|<v0>)
|
||||
r(x) -> <v1>
|
||||
ret(*|<v1>) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test ==
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(foo: Foo)
|
||||
magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
w(foo|<v0>)
|
||||
2 mark({ foo[1] += 2 })
|
||||
mark(foo[1])
|
||||
r(foo) -> <v1>
|
||||
r(1) -> <v2>
|
||||
mark(foo[1])
|
||||
call(foo[1], get|<v1>, <v2>) -> <v3>
|
||||
r(2) -> <v4>
|
||||
mark(foo[1] += 2)
|
||||
call(foo[1] += 2, plus|<v3>, <v4>) -> <v5>
|
||||
r(foo) -> <v6>
|
||||
r(foo[1], set|<v6>) -> <v7>
|
||||
r(1) -> <v8>
|
||||
call(foo[1] += 2, invoke|<v7>, <v8>, <v5>) -> <v9>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
@@ -1,13 +0,0 @@
|
||||
class Bar {
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
|
||||
fun Foo.get(x: Int): Int = x
|
||||
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
<v1>: Int NEW: magic[FAKE_INITIALIZER](y: Int) -> <v1>
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
Bar() <v0>: Bar NEW: call(Bar(), <init>) -> <v0>
|
||||
=====================
|
||||
== get ==
|
||||
fun Foo.get(x: Int): Int = x
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
x <v1>: Int NEW: r(x) -> <v1>
|
||||
=====================
|
||||
== test ==
|
||||
fun test(foo: Foo) {
|
||||
foo[1] += 2
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
foo <v6>: Foo NEW: r(foo) -> <v6>
|
||||
1 <v8>: Int NEW: r(1) -> <v8>
|
||||
foo[1] <v7>: Bar NEW: r(foo[1], set|<v6>) -> <v7>
|
||||
2 <v4>: Int NEW: r(2) -> <v4>
|
||||
foo[1] += 2 <v9>: * NEW: call(foo[1] += 2, invoke|<v7>, <v8>, <v5>) -> <v9>
|
||||
{ foo[1] += 2 } <v9>: * COPY
|
||||
=====================
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
class Bar {
|
||||
fun invoke(x: Int): Int = x
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val get: Bar = Bar()
|
||||
}
|
||||
|
||||
fun test1(foo: Foo) {
|
||||
foo[1]
|
||||
}
|
||||
|
||||
fun test2(foo: Foo, get: Foo.(Int) -> Int) {
|
||||
foo[1]
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int): Int = x
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int): Int = x
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
x <v1>: Int NEW: r(x) -> <v1>
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val get: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
Bar() <v0>: Bar NEW: call(Bar(), <init>) -> <v0>
|
||||
=====================
|
||||
== test1 ==
|
||||
fun test1(foo: Foo) {
|
||||
foo[1]
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
foo <v1>: Foo NEW: r(foo) -> <v1>
|
||||
1 <v3>: Int NEW: r(1) -> <v3>
|
||||
foo[1] <v4>: * NEW: call(foo[1], invoke|<v2>, <v3>) -> <v4>
|
||||
{ foo[1] } <v4>: * COPY
|
||||
=====================
|
||||
== test2 ==
|
||||
fun test2(foo: Foo, get: Foo.(Int) -> Int) {
|
||||
foo[1]
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
<v1>: {<: Foo.(Int) -> Int} NEW: magic[FAKE_INITIALIZER](get: Foo.(Int) -> Int) -> <v1>
|
||||
foo <v3>: Foo NEW: r(foo) -> <v3>
|
||||
1 <v4>: Int NEW: r(1) -> <v4>
|
||||
foo[1] <v5>: * NEW: call(foo[1], invoke|<v2>, <v3>, <v4>) -> <v5>
|
||||
{ foo[1] } <v5>: * COPY
|
||||
=====================
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
class Bar {
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
|
||||
class Foo {
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
|
||||
fun test1(foo: Foo) {
|
||||
foo[1] = 2
|
||||
}
|
||||
|
||||
fun test2(foo: Foo, set: Foo.(Int, Int) -> Int) {
|
||||
foo[1] = 2
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== invoke ==
|
||||
fun invoke(x: Int, y: Int) {}
|
||||
---------------------
|
||||
<v0>: Int NEW: magic[FAKE_INITIALIZER](x: Int) -> <v0>
|
||||
<v1>: Int NEW: magic[FAKE_INITIALIZER](y: Int) -> <v1>
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo {
|
||||
val set: Bar = Bar()
|
||||
}
|
||||
---------------------
|
||||
Bar() <v0>: Bar NEW: call(Bar(), <init>) -> <v0>
|
||||
=====================
|
||||
== test1 ==
|
||||
fun test1(foo: Foo) {
|
||||
foo[1] = 2
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
foo <v1>: Foo NEW: r(foo) -> <v1>
|
||||
1 <v3>: Int NEW: r(1) -> <v3>
|
||||
foo[1] <v2>: Bar NEW: r(foo[1], set|<v1>) -> <v2>
|
||||
2 <v4>: Int NEW: r(2) -> <v4>
|
||||
foo[1] = 2 <v5>: * NEW: call(foo[1] = 2, invoke|<v2>, <v3>, <v4>) -> <v5>
|
||||
{ foo[1] = 2 } <v5>: * COPY
|
||||
=====================
|
||||
== test2 ==
|
||||
fun test2(foo: Foo, set: Foo.(Int, Int) -> Int) {
|
||||
foo[1] = 2
|
||||
}
|
||||
---------------------
|
||||
<v0>: Foo NEW: magic[FAKE_INITIALIZER](foo: Foo) -> <v0>
|
||||
<v1>: {<: Foo.(Int, Int) -> Int} NEW: magic[FAKE_INITIALIZER](set: Foo.(Int, Int) -> Int) -> <v1>
|
||||
foo <v2>: Foo NEW: r(foo) -> <v2>
|
||||
1 <v4>: Int NEW: r(1) -> <v4>
|
||||
foo[1] <v3>: {<: (Foo, Int, Int) -> Int} NEW: r(foo[1], set) -> <v3>
|
||||
2 <v5>: Int NEW: r(2) -> <v5>
|
||||
foo[1] = 2 <v6>: * NEW: call(foo[1] = 2, invoke|<v3>, <v2>, <v4>, <v5>) -> <v6>
|
||||
{ foo[1] = 2 } <v6>: * COPY
|
||||
=====================
|
||||
@@ -1,24 +0,0 @@
|
||||
var a = A()
|
||||
var b = A()
|
||||
|
||||
class A(var value: Int = 0)
|
||||
|
||||
fun prefix(inc: A.() -> A) {
|
||||
++a
|
||||
}
|
||||
|
||||
fun postfix(inc: A.() -> A) {
|
||||
b++
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
prefix { ++value; this }
|
||||
|
||||
if (a.value != 1) return "fail 1"
|
||||
|
||||
postfix { value++; this }
|
||||
|
||||
if (b.value != 1) return "fail 2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
fun foo(compareTo: Any.(p: Function0<Int>) -> Int, p: () -> Int) {
|
||||
p < p
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
foo({ it() }, { 42 })
|
||||
return "OK"
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
class A
|
||||
|
||||
fun foo(plusAssign: A.(A) -> Unit) {
|
||||
A() += A()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
foo { }
|
||||
return "OK"
|
||||
}
|
||||
@@ -277,30 +277,12 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("complexAssignmentWithGetSetViaVar.kt")
|
||||
public void testComplexAssignmentWithGetSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("complexAssignmentWithSetViaVar.kt")
|
||||
public void testComplexAssignmentWithSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("equals.kt")
|
||||
public void testEquals() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("getViaVar.kt")
|
||||
public void testGetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("incrementAtTheEnd.kt")
|
||||
public void testIncrementAtTheEnd() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt");
|
||||
@@ -318,12 +300,6 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("setViaVar.kt")
|
||||
public void testSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/cfg/deadCode")
|
||||
|
||||
@@ -279,30 +279,12 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("complexAssignmentWithGetSetViaVar.kt")
|
||||
public void testComplexAssignmentWithGetSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithGetSetViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("complexAssignmentWithSetViaVar.kt")
|
||||
public void testComplexAssignmentWithSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/complexAssignmentWithSetViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("equals.kt")
|
||||
public void testEquals() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/equals.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("getViaVar.kt")
|
||||
public void testGetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/getViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("incrementAtTheEnd.kt")
|
||||
public void testIncrementAtTheEnd() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/incrementAtTheEnd.kt");
|
||||
@@ -320,12 +302,6 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/notEqual.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("setViaVar.kt")
|
||||
public void testSetViaVar() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cfg/conventions/setViaVar.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/cfg/deadCode")
|
||||
|
||||
@@ -9253,12 +9253,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4991.kt")
|
||||
public void testKt4991() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/kt4991.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedMaps.kt")
|
||||
public void testNestedMaps() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/operatorConventions/nestedMaps.kt");
|
||||
@@ -12622,12 +12616,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4682.kt")
|
||||
public void testKt4682() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4682.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt5056.kt")
|
||||
public void testKt5056() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt5056.kt");
|
||||
@@ -12759,12 +12747,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/typeCastException.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("unjustifiedReferenceTarget.kt")
|
||||
public void testUnjustifiedReferenceTarget() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/unjustifiedReferenceTarget.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/codegen/box/reified")
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
// PARAM_DESCRIPTOR: value-parameter unaryPlus: kotlin.String.() -> kotlin.Unit defined in foo
|
||||
// PARAM_TYPES: kotlin.String.() -> kotlin.Unit
|
||||
|
||||
fun foo(unaryPlus: String.() -> Unit) {
|
||||
<selection>+</selection> "A"
|
||||
}
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
// PARAM_DESCRIPTOR: value-parameter unaryPlus: kotlin.String.() -> kotlin.Unit defined in foo
|
||||
// PARAM_TYPES: kotlin.String.() -> kotlin.Unit
|
||||
|
||||
fun foo(unaryPlus: String.() -> Unit) {
|
||||
"A".(function(plus))()
|
||||
}
|
||||
|
||||
private fun function(unaryPlus: String.() -> Unit) = unaryPlus
|
||||
-6
@@ -837,12 +837,6 @@ public class ExtractionTestGenerated extends AbstractExtractionTest {
|
||||
doExtractFunctionTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("convertUnaryExpression.kt")
|
||||
public void testConvertUnaryExpression() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/convertUnaryExpression.kt");
|
||||
doExtractFunctionTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("delegatingFunction.kt")
|
||||
public void testDelegatingFunction() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/refactoring/extractFunction/basic/delegatingFunction.kt");
|
||||
|
||||
+1
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -120,8 +120,4 @@ public final class OperatorOverloadingTest extends SingleFileTranslationTest {
|
||||
public void testOverloadUnaryOperationsViaExtensionFunctions() throws Exception {
|
||||
fooBoxTest();
|
||||
}
|
||||
|
||||
public void testOverloadByLambda() throws Exception {
|
||||
checkFooBoxIsOk();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ fun testExtensionFunctionAsCompareTo() {
|
||||
val x: B = B(100)
|
||||
val y: B = B(200)
|
||||
|
||||
assertEquals(false, x < y, "ext fun: x < y")
|
||||
assertEquals(true, x > y, "ext fun: x > y")
|
||||
assertEquals(1, x.compareTo(y), "ext fun: x compareTo y")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// EA-56241
|
||||
package foo
|
||||
|
||||
class A(val v: Int)
|
||||
|
||||
val times: A.(Int) -> Int = { a -> this.v * a }
|
||||
|
||||
fun test(div: A.(Int) -> Int) = A(20) / 4
|
||||
|
||||
fun box(): String {
|
||||
val compareTo: A.(A) -> Int = { a: A -> this.v - a.v }
|
||||
|
||||
assertEquals(28, A(4) * 7)
|
||||
assertEquals(5, test { this.v / it })
|
||||
assertEquals(false, A(49) <= A(7))
|
||||
assertEquals(true, A(5) > A(1))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user