mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
intersection type presentable name with & (IDEA-115802)
This commit is contained in:
@@ -15,8 +15,10 @@
|
||||
*/
|
||||
package com.intellij.psi;
|
||||
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.TypeConversionUtil;
|
||||
import com.intellij.util.Function;
|
||||
import gnu.trove.THashSet;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -97,7 +99,12 @@ public class PsiIntersectionType extends PsiType {
|
||||
|
||||
@Override
|
||||
public String getPresentableText() {
|
||||
return myConjuncts[0].getPresentableText();
|
||||
return StringUtil.join(myConjuncts, new Function<PsiType, String>() {
|
||||
@Override
|
||||
public String fun(PsiType psiType) {
|
||||
return psiType.getPresentableText();
|
||||
}
|
||||
}, " & ");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import java.io.Serializable;
|
||||
|
||||
// "Change type arguments to <Serializable>" "true"
|
||||
// "Change type arguments to <Serializable & Comparable<? extends Serializable & Comparable<? extends Comparable<?>>>>" "true"
|
||||
class Generic<E> {
|
||||
Generic(E arg, E arg1) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// "Change type arguments to <Serializable>" "true"
|
||||
// "Change type arguments to <Serializable & Comparable<? extends Serializable & Comparable<? extends Comparable<?>>>>" "true"
|
||||
class Generic<E> {
|
||||
Generic(E arg, E arg1) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user