IDEADEV-41362

This commit is contained in:
Maxim Medvedev
2009-11-17 16:54:52 +03:00
parent 387d37c0d9
commit dab2096093
3 changed files with 6 additions and 2 deletions
@@ -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();}
}
@@ -0,0 +1,3 @@
def foo={String s->print s}
foo "${2}"