mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-56795 Groovy method does not resolve
This commit is contained in:
@@ -71,7 +71,7 @@ public class GppTypeConverter extends GrTypeConverter {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasDefaultConstructor(lType)) {
|
||||
if (!isMethodCallConversion(context) && hasDefaultConstructor(lType)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,6 +109,8 @@ public class GrMapType extends GrLiteralClassType {
|
||||
}
|
||||
|
||||
public String getInternalCanonicalText() {
|
||||
if (myStringEntries.size() == 0) return "[:]";
|
||||
|
||||
List<String> components = new ArrayList<String>();
|
||||
for (String s : myStringEntries.keySet()) {
|
||||
components.add("'" + s + "':" + getInternalCanonicalText(myStringEntries.get(s)));
|
||||
|
||||
@@ -68,7 +68,7 @@ public class GroovyHighlightingTest extends LightCodeInsightFixtureTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTest(LocalInspectionTool... tools) throws Exception {
|
||||
private void doTest(LocalInspectionTool... tools) {
|
||||
myFixture.enableInspections(tools);
|
||||
myFixture.testHighlighting(true, false, false, getTestName(false) + ".groovy");
|
||||
}
|
||||
@@ -280,4 +280,8 @@ public class GroovyHighlightingTest extends LightCodeInsightFixtureTestCase {
|
||||
}
|
||||
|
||||
public void testNumberDuplicatesInMaps() throws Exception {doTest();}
|
||||
|
||||
public void testMapNotAcceptedAsStringParameter() {
|
||||
doTest();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
class A {
|
||||
void method(String m) {}
|
||||
|
||||
{
|
||||
method<warning descr="'method' in 'A' cannot be applied to '([:])'">([:])</warning>
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class A {
|
||||
void method(Map m, Closure e ) {}
|
||||
void method(String m) {}
|
||||
|
||||
{
|
||||
meth<ref>od([:])
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user