New J2K: fix tests due to changes in inspections behaviour
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
|||||||
val d3 = Array<Array<IntArray>>(5) { arrayOfNulls(5) }
|
val d3: Array<Array<IntArray>> = Array(5) { arrayOfNulls(5) }
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
val ss = Array<Array<String>>(5) { arrayOfNulls(5) }
|
val ss: Array<Array<String>> = Array(5) { arrayOfNulls(5) }
|
||||||
+1
-1
@@ -1 +1 @@
|
|||||||
val sss = Array(5) { Array<Array<String>>(5) { arrayOfNulls(5) } }
|
val sss: Array<Array<Array<String>>> = Array(5) { Array(5) { arrayOfNulls(5) } }
|
||||||
+5
-10
@@ -42,7 +42,7 @@ internal class Java8Class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testMemberFunctionThroughClass() {
|
fun testMemberFunctionThroughClass() {
|
||||||
val memberFunFromClass: JFunction2<Java8Class, Int> = JFunction2 { obj: Java8Class -> obj.memberFun() }
|
val memberFunFromClass = JFunction2 { obj: Java8Class -> obj.memberFun() }
|
||||||
memberFunFromClass.foo(Java8Class())
|
memberFunFromClass.foo(Java8Class())
|
||||||
MethodReferenceHelperClass.staticFun2 { obj: Java8Class -> obj.memberFun() }
|
MethodReferenceHelperClass.staticFun2 { obj: Java8Class -> obj.memberFun() }
|
||||||
h.memberFun2 { obj: Java8Class -> obj.memberFun() }
|
h.memberFun2 { obj: Java8Class -> obj.memberFun() }
|
||||||
@@ -54,23 +54,19 @@ internal class Java8Class {
|
|||||||
memberFunFromSameClass.foo()
|
memberFunFromSameClass.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { obj.memberFun() }
|
MethodReferenceHelperClass.staticFun0 { obj.memberFun() }
|
||||||
h.memberFun0 { obj.memberFun() }
|
h.memberFun0 { obj.memberFun() }
|
||||||
|
|
||||||
val anotherObj = Test()
|
val anotherObj = Test()
|
||||||
val memFunFromAnotherClass = JFunction0 { anotherObj.memberFun() }
|
val memFunFromAnotherClass = JFunction0 { anotherObj.memberFun() }
|
||||||
memFunFromAnotherClass.foo()
|
memFunFromAnotherClass.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { anotherObj.memberFun() }
|
MethodReferenceHelperClass.staticFun0 { anotherObj.memberFun() }
|
||||||
h.memberFun0 { anotherObj.memberFun() }
|
h.memberFun0 { anotherObj.memberFun() }
|
||||||
|
|
||||||
val memberFunThroughObj1 = JFunction0 { field.memberFun() }
|
val memberFunThroughObj1 = JFunction0 { field.memberFun() }
|
||||||
memberFunThroughObj1.foo()
|
memberFunThroughObj1.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { field.memberFun() }
|
MethodReferenceHelperClass.staticFun0 { field.memberFun() }
|
||||||
h.memberFun0 { field.memberFun() }
|
h.memberFun0 { field.memberFun() }
|
||||||
|
|
||||||
val memberFunThroughObj2 = JFunction0 { Test.field.memberFun() }
|
val memberFunThroughObj2 = JFunction0 { Test.field.memberFun() }
|
||||||
memberFunThroughObj2.foo()
|
memberFunThroughObj2.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { Test.field.memberFun() }
|
MethodReferenceHelperClass.staticFun0 { Test.field.memberFun() }
|
||||||
h.memberFun0 { Test.field.memberFun() }
|
h.memberFun0 { Test.field.memberFun() }
|
||||||
|
|
||||||
val memberFunThroughObj3 = JFunction0 { Test.staticFun().memberFun() }
|
val memberFunThroughObj3 = JFunction0 { Test.staticFun().memberFun() }
|
||||||
memberFunThroughObj3.foo()
|
memberFunThroughObj3.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { Test.staticFun().memberFun() }
|
MethodReferenceHelperClass.staticFun0 { Test.staticFun().memberFun() }
|
||||||
@@ -90,7 +86,7 @@ internal class Java8Class {
|
|||||||
constructorAnotherClass.foo()
|
constructorAnotherClass.foo()
|
||||||
MethodReferenceHelperClass.staticFun0 { Test() }
|
MethodReferenceHelperClass.staticFun0 { Test() }
|
||||||
h.memberFun0 { Test() }
|
h.memberFun0 { Test() }
|
||||||
val constructorAnotherClassWithParam: JFunction2<Int, Test> = JFunction2 { i: Int -> Test(i) }
|
val constructorAnotherClassWithParam = JFunction2 { i: Int -> Test(i) }
|
||||||
constructorAnotherClassWithParam.foo(1)
|
constructorAnotherClassWithParam.foo(1)
|
||||||
MethodReferenceHelperClass.staticFun2 { i: Int -> Test(i) }
|
MethodReferenceHelperClass.staticFun2 { i: Int -> Test(i) }
|
||||||
h.memberFun2 { i: Int -> Test(i) }
|
h.memberFun2 { i: Int -> Test(i) }
|
||||||
@@ -105,18 +101,18 @@ internal class Java8Class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testLibraryFunctions() {
|
fun testLibraryFunctions() {
|
||||||
val memberFunFromClass: JFunction2<String, Int> = JFunction2 { obj: String -> obj.length }
|
val memberFunFromClass = JFunction2 { obj: String -> obj.length }
|
||||||
memberFunFromClass.foo("str")
|
memberFunFromClass.foo("str")
|
||||||
Thread(Runnable { println() }).start()
|
Thread(Runnable { println() }).start()
|
||||||
Runnable { println() }.run()
|
Runnable { println() }.run()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testOverloads() {
|
fun testOverloads() {
|
||||||
val constructorWithoutParams: JFunction1<String> = JFunction1 { Test.testOverloads() }
|
val constructorWithoutParams = JFunction1 { Test.testOverloads() }
|
||||||
constructorWithoutParams.foo()
|
constructorWithoutParams.foo()
|
||||||
MethodReferenceHelperClass.staticFun1 { Test.testOverloads() }
|
MethodReferenceHelperClass.staticFun1 { Test.testOverloads() }
|
||||||
h.memberFun1 { Test.testOverloads() }
|
h.memberFun1 { Test.testOverloads() }
|
||||||
val constructorWithParam: JFunction2<Int, String> = JFunction2 { i: Int -> Test.testOverloads(i) }
|
val constructorWithParam = JFunction2 { i: Int -> Test.testOverloads(i) }
|
||||||
constructorWithParam.foo(2)
|
constructorWithParam.foo(2)
|
||||||
MethodReferenceHelperClass.staticFun2 { i: Int -> Test.testOverloads(i) }
|
MethodReferenceHelperClass.staticFun2 { i: Int -> Test.testOverloads(i) }
|
||||||
h.memberFun2 { i: Int -> Test.testOverloads(i) }
|
h.memberFun2 { i: Int -> Test.testOverloads(i) }
|
||||||
@@ -134,7 +130,6 @@ internal class Java8Class {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
fun staticFun(): Int {
|
fun staticFun(): Int {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import java.util.*
|
|||||||
|
|
||||||
internal class A {
|
internal class A {
|
||||||
fun foo() {
|
fun foo() {
|
||||||
val list = listOf<String?>(null)
|
val list: List<String?> = listOf(null)
|
||||||
val set = setOf<String?>(null)
|
val set: Set<String?> = setOf(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-2
@@ -35,8 +35,8 @@ class Test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun test7() {
|
fun test7() {
|
||||||
val list: MutableList<Int> = ArrayList()
|
val list: MutableList<Int?> = ArrayList()
|
||||||
list.remove(myIntProp!!)
|
list.remove(myIntProp)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun foo1(s: String) {}
|
fun foo1(s: String) {}
|
||||||
|
|||||||
Reference in New Issue
Block a user