[Analysis API] render enhanced types
^KTIJ-28555 Fixed
This commit is contained in:
committed by
teamcity
parent
69fe60f494
commit
d935db9e3a
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: androidx/annotation/RecentlyNonNull.java
|
||||
package androidx.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.PARAMETER, ElementType.TYPE})
|
||||
public @interface RecentlyNonNull {
|
||||
}
|
||||
|
||||
// FILE: androidx/annotation/A.java
|
||||
package androidx.annotation;
|
||||
|
||||
public class A {
|
||||
@RecentlyNonNull
|
||||
public String bar(@RecentlyNonNull String string) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import androidx.annotation.A
|
||||
|
||||
fun test(a: A) = <expr>a.bar()</expr>
|
||||
analysis/analysis-api/testData/components/expressionTypeProvider/expressionType/javaEnhancedType.txt
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
expression: a.bar()
|
||||
type: kotlin.String
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: a.externalNotNullMethod()
|
||||
type: kotlin.String!
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: ClassWithExternalAnnotatedMembers.java
|
||||
public class ClassWithExternalAnnotatedMembers {
|
||||
public String externalNotNullMethod() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: annotations.xml
|
||||
<root>
|
||||
<item name='ClassWithExternalAnnotatedMembers java.lang.String externalNotNullMethod()'>
|
||||
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||
</item>
|
||||
</root>
|
||||
|
||||
|
||||
|
||||
// FILE: main.kt
|
||||
import ClassWithExternalAnnotatedMembers
|
||||
|
||||
fun test(a: ClassWithExternalAnnotatedMembers) = <expr>a.externalNotNullMethod()</expr>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
expression: a.externalNotNullMethod()
|
||||
type: kotlin.String
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
// FILE: androidx/annotation/RecentlyNonNull.java
|
||||
package androidx.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
@Target({ElementType.PARAMETER, ElementType.TYPE})
|
||||
public @interface RecentlyNonNull {
|
||||
}
|
||||
|
||||
// FILE: androidx/annotation/A.java
|
||||
package androidx.annotation;
|
||||
|
||||
public class A {
|
||||
@RecentlyNonNull
|
||||
public String bar(@RecentlyNonNull String string) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
import androidx.annotation.A
|
||||
|
||||
fun test(a: A) = a.b<caret><caret_onAirContext>ar()
|
||||
+1
@@ -0,0 +1 @@
|
||||
open fun bar(string: kotlin.String): kotlin.String
|
||||
+1
@@ -0,0 +1 @@
|
||||
open fun externalNotNullMethod(): kotlin.String?
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: ClassWithExternalAnnotatedMembers.java
|
||||
public class ClassWithExternalAnnotatedMembers {
|
||||
public String externalNotNullMethod() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: annotations.xml
|
||||
<root>
|
||||
<item name='ClassWithExternalAnnotatedMembers java.lang.String externalNotNullMethod()'>
|
||||
<annotation name='org.jetbrains.annotations.NotNull'/>
|
||||
</item>
|
||||
</root>
|
||||
|
||||
|
||||
|
||||
// FILE: main.kt
|
||||
import ClassWithExternalAnnotatedMembers
|
||||
|
||||
fun test(a: ClassWithExternalAnnotatedMembers) = a.e<caret><caret_onAirContext>xternalNotNullMethod()
|
||||
+1
@@ -0,0 +1 @@
|
||||
open fun externalNotNullMethod(): kotlin.String
|
||||
Reference in New Issue
Block a user