Java type annotations supported in LazyJavaTypeResolver
This commit is contained in:
committed by
Denis Zharkov
parent
eaae88133c
commit
c6b91b0f81
+1
-1
@@ -32,7 +32,7 @@ public abstract class JavaClassifierImpl<Psi extends PsiClass> extends JavaEleme
|
||||
super(psiClass);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
@Override
|
||||
public PsiAnnotationOwner getAnnotationOwnerPsi() {
|
||||
return getPsi().getModifierList();
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package test;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@Target(ElementType.TYPE_USE)
|
||||
@interface A {
|
||||
String value() default "";
|
||||
}
|
||||
|
||||
interface G<T> {}
|
||||
interface G2<A, B> {}
|
||||
|
||||
public interface TypeAnnotations<TT> {
|
||||
void f(G<@A String> p);
|
||||
void f(G2<@A String, @A Integer> p);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package test
|
||||
|
||||
public interface TypeAnnotations</*0*/ TT> {
|
||||
public abstract fun f(/*0*/ p: test.G2<@[test.A()] kotlin.String!, @[test.A()] kotlin.Int!>!): kotlin.Unit
|
||||
public abstract fun f(/*0*/ p: test.G<@[test.A()] kotlin.String!>!): kotlin.Unit
|
||||
}
|
||||
@@ -5156,6 +5156,12 @@ public class LoadJavaTestGenerated extends AbstractLoadJavaTest {
|
||||
doTestSourceJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("TypeAnnotations.java")
|
||||
public void testTypeAnnotations() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/TypeAnnotations.java");
|
||||
doTestSourceJava(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("WrongNumberOfGenericParameters.java")
|
||||
public void testWrongNumberOfGenericParameters() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/loadJava/sourceJava/WrongNumberOfGenericParameters.java");
|
||||
|
||||
Reference in New Issue
Block a user