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:
@@ -95,7 +95,7 @@ public class GroovyAnnotator implements Annotator {
|
||||
return node != null && PsiTreeUtil.getParentOfType(element, GrDocComment.class) != null || element instanceof GrDocComment;
|
||||
}
|
||||
|
||||
public void annotate(PsiElement element, AnnotationHolder holder) {
|
||||
public void annotate(@NotNull PsiElement element, @NotNull AnnotationHolder holder) {
|
||||
if (element instanceof GrCodeReferenceElement) {
|
||||
checkReferenceElement(holder, (GrCodeReferenceElement)element);
|
||||
}
|
||||
@@ -1124,7 +1124,7 @@ public class GroovyAnnotator implements Annotator {
|
||||
for (int i = 0; i < argumentTypes.length; i++) {
|
||||
final PsiType paramType = TypesUtil.boxPrimitiveType(paramTypes[i], manager, resolveScope);
|
||||
final PsiType argType = argumentTypes[i];
|
||||
if (!paramType.isAssignableFrom(argType)) return false;
|
||||
if (!TypesUtil.isAssignableByMethodCallConversion(paramType, argType, manager, resolveScope)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -189,4 +189,5 @@ public class GroovyHighlightingTest extends LightCodeInsightFixtureTestCase {
|
||||
}
|
||||
|
||||
public void testGstringAssignableToString() throws Exception{doTest();}
|
||||
public void testGstringAssignableToStringInClosureParameter() throws Exception{doTest();}
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
def foo={String s->print s}
|
||||
|
||||
foo "${2}"
|
||||
Reference in New Issue
Block a user