mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 09:19:13 +07:00
include anonym prefix in internal canonical text to avoid incompatibility messages with "same" types on both sides
This commit is contained in:
@@ -184,6 +184,9 @@ public class PsiImmediateClassType extends PsiClassType.Stub {
|
||||
ClassResolveResult baseResolveResult = ((PsiAnonymousClass)aClass).getBaseClassType().resolveGenerics();
|
||||
PsiClass baseClass = baseResolveResult.getElement();
|
||||
if (baseClass != null) {
|
||||
if (textType == TextType.INT_CANONICAL) {
|
||||
buffer.append("anonymous ");
|
||||
}
|
||||
buildText(baseClass, baseResolveResult.getSubstitutor(), buffer, textType, false);
|
||||
}
|
||||
return;
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ class e {
|
||||
|
||||
class ccc {
|
||||
static Comparable<? super ccc> f() {
|
||||
return <warning descr="Unchecked assignment: 'java.lang.Comparable' to 'java.lang.Comparable<? super ccc>'">new Comparable () {
|
||||
return <warning descr="Unchecked assignment: 'anonymous java.lang.Comparable' to 'java.lang.Comparable<? super ccc>'">new Comparable () {
|
||||
public int compareTo(final Object o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class Test {
|
||||
}
|
||||
|
||||
public static <C extends String> IConverter<C> getConverter1(Class<C> type) {
|
||||
return <error descr="Inconvertible types; cannot cast 'DoubleConverter' to 'IConverter<C>'">(IConverter<C>)new DoubleConverter() {
|
||||
return <error descr="Inconvertible types; cannot cast 'anonymous DoubleConverter' to 'IConverter<C>'">(IConverter<C>)new DoubleConverter() {
|
||||
}</error>;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ class e {
|
||||
|
||||
class ccc {
|
||||
static Comparable<? super ccc> f() {
|
||||
return <warning descr="Unchecked assignment: 'java.lang.Comparable' to 'java.lang.Comparable<? super ccc>'">new Comparable () {
|
||||
return <warning descr="Unchecked assignment: 'anonymous java.lang.Comparable' to 'java.lang.Comparable<? super ccc>'">new Comparable () {
|
||||
public int compareTo(final Object o) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ class Test {
|
||||
}
|
||||
|
||||
public static <C extends String> IConverter<C> getConverter1(Class<C> type) {
|
||||
return <error descr="Inconvertible types; cannot cast 'DoubleConverter' to 'IConverter<C>'">(IConverter<C>)new DoubleConverter() {
|
||||
return <error descr="Inconvertible types; cannot cast 'anonymous DoubleConverter' to 'IConverter<C>'">(IConverter<C>)new DoubleConverter() {
|
||||
}</error>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user