[AA] KTIJ-23563 Add reference resolve tests for working cases
- Type arguments in invalid calls/property accesses are resolved correctly in many cases, for which this commit adds test cases.
This commit is contained in:
committed by
Space Team
parent
42ded7be09
commit
2922f85a98
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
false<<caret>Int>
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
true<<caret>String>
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
true<<caret>String>("hello")
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
analysis/analysis-api/testData/referenceResolve/typeArgument/functionCall/tooManyTypeArguments2a.txt
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
unresolved<<caret>String>()
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
unresolved<String, <caret>Int>()
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
unresolved<<caret>String>(0)
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
unresolved<String, <caret>Int>("hello", 0)
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun <A : Number> generic(a: A) { }
|
||||
|
||||
fun foo() {
|
||||
generic<<caret>String>("wow")
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun <A : Number> generic(a: A) { }
|
||||
|
||||
fun foo() {
|
||||
generic<<caret>Int, String>(2L)
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
val variable = "hello"
|
||||
variable<<caret>String>
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
val variable = "hello"
|
||||
variable<String, <caret>Int>
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo(parameter: Int) {
|
||||
parameter<<caret>String>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo(parameter: Int) {
|
||||
parameter<String, <caret>Int>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// COMPILATION_ERRORS
|
||||
val property: Int = 10
|
||||
|
||||
fun foo() {
|
||||
property<<caret>Int>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// COMPILATION_ERRORS
|
||||
val property: Int = 10
|
||||
|
||||
fun foo() {
|
||||
property<Int, <caret>String>
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// COMPILATION_ERRORS
|
||||
val property: Int
|
||||
get() = 10
|
||||
|
||||
fun foo() {
|
||||
property<<caret>Int>
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class Intprivate constructor : kotlin.Number(), kotlin.Comparable<kotlin.Int>, java.io.Serializable
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
// COMPILATION_ERRORS
|
||||
val property: Int
|
||||
get() = 10
|
||||
|
||||
fun foo() {
|
||||
property<Int, <caret>String>
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// COMPILATION_ERRORS
|
||||
fun foo() {
|
||||
unresolved<<caret>String>
|
||||
}
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
Resolved to:
|
||||
0: (in kotlin) class String : kotlin.Comparable<kotlin.String>, kotlin.CharSequence, java.io.Serializable
|
||||
Reference in New Issue
Block a user