mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-41362
This commit is contained in:
+2
@@ -216,6 +216,8 @@ public class TypesUtil {
|
||||
public static boolean isAssignableByMethodCallConversion(PsiType lType, PsiType rType, PsiManager manager, GlobalSearchScope scope) {
|
||||
if (lType == null || rType == null) return false;
|
||||
|
||||
if (lType.equalsToText(JAVA_LANG_STRING)) return true;
|
||||
|
||||
if (isNumericType(lType) && isNumericType(rType)) {
|
||||
lType = unboxPrimitiveTypeWrapper(lType);
|
||||
if (lType.equalsToText(JAVA_MATH_BIG_DECIMAL)) lType = PsiType.DOUBLE;
|
||||
|
||||
@@ -187,4 +187,6 @@ public class GroovyHighlightingTest extends LightCodeInsightFixtureTestCase {
|
||||
public void testFQNJavaClassesUsages() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testGstringAssignableToString() throws Exception{doTest();}
|
||||
}
|
||||
+1
-1
@@ -393,7 +393,7 @@ public class ResolveMethodTest extends GroovyResolveTestCase {
|
||||
PsiReference ref = configureByFile("unboxBigDecimal/A.groovy");
|
||||
PsiElement resolved = ref.resolve();
|
||||
assertTrue(resolved instanceof PsiMethod);
|
||||
assertEquals(((PsiMethod) resolved).getReturnType(), PsiType.DOUBLE);
|
||||
assertEquals(PsiType.DOUBLE, ((PsiMethod) resolved).getReturnType());
|
||||
}
|
||||
|
||||
public void testGrvy1157() throws Exception {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
def foo(Date d, int x) {}
|
||||
|
||||
def foo(String s, double x) {}
|
||||
|
||||
def bar = 10
|
||||
|
||||
foo "$bar", 2
|
||||
Reference in New Issue
Block a user