mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-83672 error: name clash: expandChildren(Object,Class<?>) and expandChildren(Object,Class) have the same erasure
This commit is contained in:
+3
-5
@@ -20,12 +20,10 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.impl.light.LightMethodBuilder;
|
||||
import com.intellij.psi.impl.light.LightMirrorMethod;
|
||||
import com.intellij.psi.util.CachedValue;
|
||||
import com.intellij.psi.util.MethodSignature;
|
||||
import com.intellij.psi.util.PsiUtil;
|
||||
import com.intellij.psi.util.TypeConversionUtil;
|
||||
import com.intellij.psi.util.*;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.containers.hash.HashSet;
|
||||
import gnu.trove.THashMap;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.plugins.groovy.GroovyFileType;
|
||||
@@ -55,7 +53,7 @@ public class DelegatedMethodsContributor extends AstTransformContributor {
|
||||
|
||||
if (!checkForDelegate(clazz)) return;
|
||||
|
||||
Map<MethodSignature, PsiMethod> signatures = new HashMap<MethodSignature, PsiMethod>();
|
||||
Map<MethodSignature, PsiMethod> signatures = new THashMap<MethodSignature, PsiMethod>(MethodSignatureUtil.METHOD_PARAMETERS_ERASURE_EQUALITY);
|
||||
initializeSignatures(clazz, PsiSubstitutor.EMPTY, signatures, processed);
|
||||
|
||||
List<PsiMethod> methods = new ArrayList<PsiMethod>();
|
||||
|
||||
@@ -117,6 +117,11 @@ public class GeneratorTest extends LightGroovyTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testErasedOverloadedMethodInDelegate() {
|
||||
myFixture.addClass("package groovy.lang; public @interface Delegate {}");
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void doTest() {
|
||||
final String relTestPath = getTestName(true) + ".test";
|
||||
final List<String> data = TestUtils.readInput(getTestDataPath() + "/" + relTestPath);
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
class A {
|
||||
def foo(List<?> s){print 'A'}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
def foo(List s){print 'B'}
|
||||
}
|
||||
|
||||
class C {
|
||||
@Delegate B b = new B()
|
||||
}
|
||||
-----
|
||||
public class A extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public java.lang.Object foo(java.util.List<?> s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public java.lang.Object getProperty(java.lang.String property) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setProperty(java.lang.String property, java.lang.Object newValue) {
|
||||
return ;
|
||||
}
|
||||
|
||||
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public groovy.lang.MetaClass getMetaClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setMetaClass(groovy.lang.MetaClass metaClass) {
|
||||
return ;
|
||||
}
|
||||
|
||||
}
|
||||
---
|
||||
public class B extends A implements groovy.lang.GroovyObject {
|
||||
public java.lang.Object foo(java.util.List s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public java.lang.Object getProperty(java.lang.String property) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setProperty(java.lang.String property, java.lang.Object newValue) {
|
||||
return ;
|
||||
}
|
||||
|
||||
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public groovy.lang.MetaClass getMetaClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setMetaClass(groovy.lang.MetaClass metaClass) {
|
||||
return ;
|
||||
}
|
||||
|
||||
}
|
||||
---
|
||||
public class C extends groovy.lang.GroovyObjectSupport implements groovy.lang.GroovyObject {
|
||||
public B getB() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setB(B b) {
|
||||
return ;
|
||||
}
|
||||
|
||||
public java.lang.Object foo(java.util.List s) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public java.lang.Object getProperty(java.lang.String property) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setProperty(java.lang.String property, java.lang.Object newValue) {
|
||||
return ;
|
||||
}
|
||||
|
||||
public java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public groovy.lang.MetaClass getMetaClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setMetaClass(groovy.lang.MetaClass metaClass) {
|
||||
return ;
|
||||
}
|
||||
|
||||
private B b = null;
|
||||
}
|
||||
---
|
||||
Reference in New Issue
Block a user