mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
compare primitive types with equals as type annotations could spoil them (IDEA-147399)
This commit is contained in:
@@ -75,6 +75,16 @@ public class InferredTypeTest extends LightCodeInsightFixtureTestCase {
|
||||
assertTrue(ensureNotCached.getCanonicalText(), ensureNotCached.equalsToText("java.util.List<java.lang.Integer>"));
|
||||
}
|
||||
|
||||
public void testAnnotatedVoidReturnType() throws Exception {
|
||||
myFixture.addClass("@java.lang.annotation.Target(value={java.lang.annotation.ElementType.TYPE_USE}) @interface D {}");
|
||||
final PsiJavaFile file = (PsiJavaFile)myFixture.addFileToProject("R.java", "public interface R {@D void run();}");
|
||||
final PsiClass psiClass = file.getClasses()[0];
|
||||
final PsiMethod method = psiClass.getMethods()[0];
|
||||
assertFalse(PsiType.VOID == method.getReturnType());
|
||||
myFixture.configureByText("a.java", "class A {{R r = () -> {};}} ");
|
||||
myFixture.checkHighlighting(false, false, false);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected LightProjectDescriptor getProjectDescriptor() {
|
||||
|
||||
Reference in New Issue
Block a user