mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] K2 Completion: update test data after fixes in AA
KTIJ-28555 GitOrigin-RevId: 07aad25c8c4b093271b613d9365ab8c5375da196
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2afd4db1ab
commit
be685455fe
-16
@@ -1,16 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
override fun isFile(): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
fun f(pair: Pair<out File, out Any>) {
|
||||
if (pair.first !is C) return
|
||||
pair.first.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath", icon:"org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
// EXIST: { lookupString: "isFile", itemText: "isFile", tailText: " (from isFile())", typeText: "Boolean", attributes: "bold", icon: "org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
val v: Int = 0
|
||||
}
|
||||
|
||||
fun f(pair: Pair<out Any, out Any>) {
|
||||
if (pair.first !is C) return
|
||||
pair.first.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"grayed","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
val v: Int = 0
|
||||
|
||||
override fun isFile(): Boolean {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
fun foo(c: C) {
|
||||
c.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath","icon":"org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
// EXIST: { lookupString: "isFile", itemText: "isFile", tailText: " (from isFile())", typeText: "Boolean", attributes: "", icon: "org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
// EXIST: { lookupString: "v", itemText: "v", attributes: "bold", icon: "org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
class C : File("") {
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
file.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath","icon":"org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
// EXIST: { lookupString: "isFile", itemText: "isFile", tailText: " (from isFile())", typeText: "Boolean", attributes: "bold", icon: "org/jetbrains/kotlin/idea/icons/field_value.svg"}
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
|
||||
@@ -7,7 +7,7 @@ class A: File("") {
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!"}
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String"}
|
||||
// ABSENT: getAbsolutePath
|
||||
|
||||
/* K2 allows references to synthetic Java properties after super, see KT-55551 */
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File?) {
|
||||
file.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"grayed","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
// ABSENT: getAbsolutePath
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File?) {
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File?) {
|
||||
file?.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
// ABSENT: getAbsolutePath
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File?) {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(o: Any) {
|
||||
if (o is File) {
|
||||
o.<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
// ABSENT: getAbsolutePath
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(o: Any) {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun Any.foo() {
|
||||
if (this is File) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
// ABSENT: getAbsolutePath
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun Any.foo() {
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
file.<caret>
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!","attributes":"bold","allLookupStrings":"absolutePath, getAbsolutePath","itemText":"absolutePath"}
|
||||
// ABSENT: getAbsolutePath
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.File
|
||||
|
||||
fun foo(file: File) {
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.*
|
||||
|
||||
class A : File("") {
|
||||
fun test() {
|
||||
absolu<caret>
|
||||
}
|
||||
}
|
||||
|
||||
// EXIST: {"lookupString":"absolutePath","tailText":" (from getAbsolutePath())","typeText":"String!"}
|
||||
// ABSENT: getAbsolutePath
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_COMPARISON
|
||||
import java.io.*
|
||||
|
||||
class A : File("") {
|
||||
|
||||
-1
@@ -2,6 +2,5 @@ fun temp() {
|
||||
EnhancementFlexibleTypes.test<caret>
|
||||
}
|
||||
|
||||
// IGNORE_K2
|
||||
// EXIST: { lookupString: "testNotNull", tailText:"(string: String)", icon: "Method"}
|
||||
// EXIST: { lookupString: "testNullable", tailText:"(string: String?)", icon: "Method"}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IGNORE_K2
|
||||
// FIR_IDENTICAL
|
||||
import foo.A
|
||||
|
||||
class B : A() {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// IGNORE_K2
|
||||
// FIR_IDENTICAL
|
||||
import foo.A
|
||||
|
||||
class B : A() {
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
fun foo(): String {
|
||||
return java.io.File("x").getAbsolutePath()
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
interface Foo {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
class Bar : Foo {
|
||||
override fun foo(): String? {
|
||||
return java.lang.String.valueOf(42)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
fun test() {
|
||||
J.foo(<caret>"1", "2", "3", "4", "5")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user