mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-06 05:10:22 +07:00
don't make raw type equal to anything else (IDEA-192037)
This commit is contained in:
@@ -115,8 +115,7 @@ public abstract class PsiClassType extends PsiType implements JvmReferenceType {
|
||||
return aClass == otherClass;
|
||||
}
|
||||
return aClass.getManager().areElementsEquivalent(aClass, otherClass) &&
|
||||
(PsiUtil.isRawSubstitutor(aClass, result.getSubstitutor()) ||
|
||||
PsiUtil.equalOnEquivalentClasses(this, aClass, otherClassType, otherClass));
|
||||
PsiUtil.equalOnEquivalentClasses(this, aClass, otherClassType, otherClass);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
class Outer<T> {
|
||||
class Inner { }
|
||||
Foo<Outer.Inner> m(Foo<Outer<Integer>.Inner> foo) {
|
||||
<error descr="Incompatible types. Found: 'Foo<Outer<java.lang.Integer>.Inner>', required: 'Foo<Outer.Inner>'">return foo;</error>
|
||||
}
|
||||
}
|
||||
class Foo<X> {}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.java.codeInsight.daemon;
|
||||
|
||||
import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.testFramework.IdeaTestUtil;
|
||||
|
||||
|
||||
public class GenericsInnerClassHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
private static final String BASE_PATH = "/codeInsight/daemonCodeAnalyzer/genericsInnerClassHighlighting";
|
||||
|
||||
public void testGenericToRawAssignment() {
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return getTestName(false).contains("Jdk14") ? IdeaTestUtil.getMockJdk14() : super.getProjectJDK();
|
||||
}
|
||||
|
||||
private void doTest() {
|
||||
doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<VBox xmlns:fx="http://javafx.com/fxml" fx:controller="HighlightRaw">
|
||||
<TableView fx:id="positive"
|
||||
onSort="#sortPositive"
|
||||
onScrollToColumn="#scrollPositive"/>
|
||||
onScrollToColumn=<warning descr="Incompatible generic parameter of event handler argument: javafx.scene.control.ScrollToEvent<javafx.scene.control.TableColumn> is not assignable from javafx.scene.control.ScrollToEvent<javafx.scene.control.TableColumn>">"#scrollPositive"</warning>/>
|
||||
<TableView fx:id="negative"
|
||||
onSort=<warning descr="Incompatible event handler argument: javafx.scene.control.ScrollToEvent is not assignable from javafx.scene.control.SortEvent">"#sortNegative"</warning>
|
||||
onScrollToColumn=<warning descr="Incompatible generic parameter of event handler argument: javafx.scene.control.ScrollToEvent<javafx.scene.control.TableView> is not assignable from javafx.scene.control.ScrollToEvent<javafx.scene.control.TableColumn>">"#scrollNegative"</warning>
|
||||
|
||||
Reference in New Issue
Block a user