[Analysis API] add diagnostic tests for inner Java class usage

^KT-62892
This commit is contained in:
Dmitrii Gridin
2024-01-03 14:24:16 +01:00
committed by Space Team
parent 6c7d1babf0
commit 7efbcad121
23 changed files with 254 additions and 0 deletions
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtParameter at (11,25-61)
UNUSED_PARAMETER text ranges: [(64,73)]
PSI: KtParameter at (11,25-61)
@@ -0,0 +1,16 @@
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public class RClass {}
}
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon().RClass())
}
@@ -0,0 +1 @@
Diagnostics from elements:
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtParameter at (13,25-61)
UNUSED_PARAMETER text ranges: [(86,95)]
PSI: KtParameter at (13,25-61)
@@ -0,0 +1,18 @@
// MODULE: dep
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public class RClass {}
}
// MODULE: main(dep)
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon().RClass())
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtDotQualifiedExpression at (17,25-54)
ARGUMENT_TYPE_MISMATCH text ranges: [(169,198)]
PSI: KtDotQualifiedExpression at (17,25-54)
@@ -0,0 +1,20 @@
// IGNORE_FE10
// MODULE: lib
// MODULE_KIND: LibraryBinary
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public class RClass {}
}
// MODULE: main(lib)
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon().RClass())
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtDotQualifiedExpression at (19,25-54)
ARGUMENT_TYPE_MISMATCH text ranges: [(171,200)]
PSI: KtDotQualifiedExpression at (19,25-54)
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtParameter at (11,25-61)
UNUSED_PARAMETER text ranges: [(64,73)]
PSI: KtParameter at (11,25-61)
@@ -0,0 +1,16 @@
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public static class RClass {}
}
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon.RClass())
}
@@ -0,0 +1 @@
Diagnostics from elements:
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtParameter at (13,25-61)
UNUSED_PARAMETER text ranges: [(86,95)]
PSI: KtParameter at (13,25-61)
@@ -0,0 +1,18 @@
// MODULE: dep
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public static class RClass {}
}
// MODULE: main(dep)
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon.RClass())
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtDotQualifiedExpression at (17,25-52)
ARGUMENT_TYPE_MISMATCH text ranges: [(169,196)]
PSI: KtDotQualifiedExpression at (17,25-52)
@@ -0,0 +1,20 @@
// IGNORE_FE10
// MODULE: lib
// MODULE_KIND: LibraryBinary
// FILE: issue/pack/RowIcon.java
package issue.pack;
public class RowIcon {
public static class RClass {}
}
// MODULE: main(lib)
// FILE: usage.kt
package usage
fun testJavaNestedClass(alignment: issue.pack.RowIcon.RClass) {
}
fun checkIt() {
testJavaNestedClass(issue.pack.RowIcon.RClass())
}
@@ -0,0 +1,4 @@
Diagnostics from elements:
for PSI element of type KtDotQualifiedExpression at (19,25-52)
ARGUMENT_TYPE_MISMATCH text ranges: [(171,198)]
PSI: KtDotQualifiedExpression at (19,25-52)