mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
package a;
|
||||
|
||||
import static a.A.foo;
|
||||
|
||||
interface B extends A {
|
||||
static void bar() {
|
||||
foo("");
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
class Test {
|
||||
|
||||
static {
|
||||
@javax.annotation.Generated
|
||||
String noRedundantCastForGeneratedCode = (String) "";
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Make 'foo' return 'java.util.List<java.lang.Integer>'" "true"
|
||||
import java.util.List;
|
||||
interface Main<A, B> {
|
||||
List<A> foo();
|
||||
}
|
||||
|
||||
class MainImpl implements Main<Integer,String> {
|
||||
@Override
|
||||
public List<Integer> foo() {
|
||||
return bar();
|
||||
}
|
||||
|
||||
private List<Integer> bar() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Make 'foo' return 'java.util.List<java.lang.Integer>'" "true"
|
||||
import java.util.List;
|
||||
interface Main<A, B> {
|
||||
List<A> foo();
|
||||
}
|
||||
|
||||
class MainImpl implements Main<String, String> {
|
||||
@Override
|
||||
public List<String> foo() {
|
||||
return b<caret>ar();
|
||||
}
|
||||
|
||||
private List<Integer> bar() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
import bar.A;
|
||||
import static bar.A.foo;
|
||||
|
||||
class Usage {
|
||||
void bar() {
|
||||
A.foo();
|
||||
foo();
|
||||
}
|
||||
}
|
||||
+22
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon;
|
||||
|
||||
import com.intellij.JavaTestUtil;
|
||||
import com.intellij.codeInspection.redundantCast.RedundantCastInspection;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.testFramework.LightProjectDescriptor;
|
||||
@@ -55,6 +56,27 @@ public class LightAdvHighlightingFixtureTest extends LightCodeInsightFixtureTest
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testStaticImportCompoundWithInheritance() throws Exception {
|
||||
myFixture.addClass("package a; public interface A { static void foo(Object o){} static void foo(String str) {}}");
|
||||
|
||||
myFixture.configureByFile(getTestName(false) + ".java");
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
|
||||
public void testSuppressedInGenerated() throws Exception {
|
||||
myFixture.addClass("package javax.annotation; public @interface Generated {}");
|
||||
final RedundantCastInspection inspection = new RedundantCastInspection();
|
||||
try {
|
||||
myFixture.enableInspections(inspection);
|
||||
myFixture.configureByFile(getTestName(false) + ".java");
|
||||
myFixture.checkHighlighting();
|
||||
}
|
||||
finally {
|
||||
myFixture.disableInspections(inspection);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBasePath() {
|
||||
return JavaTestUtil.getRelativeJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/advFixture";
|
||||
|
||||
Reference in New Issue
Block a user