mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-126389 FromString ClosureParams Hint should use method.getTypeParametersList() as a context for creating type because method does not process its type parameters in processDeclarations()
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ public class FromStringHintProcessor extends SignatureHintProcessor {
|
||||
@Override
|
||||
public PsiType fun(String param) {
|
||||
try {
|
||||
PsiType original = JavaPsiFacade.getElementFactory(method.getProject()).createTypeFromText(param, method);
|
||||
PsiType original = JavaPsiFacade.getElementFactory(method.getProject()).createTypeFromText(param, method.getTypeParameterList());
|
||||
return substitutor.substitute(original);
|
||||
}
|
||||
catch (IncorrectOperationException e) {
|
||||
|
||||
+12
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.plugins.groovy.lang.resolve
|
||||
|
||||
import com.intellij.psi.PsiMethod
|
||||
import com.intellij.testFramework.LightProjectDescriptor
|
||||
import org.jetbrains.plugins.groovy.GroovyLightProjectDescriptor
|
||||
|
||||
@@ -205,4 +206,15 @@ class Thing {
|
||||
}
|
||||
|
||||
|
||||
void testClosureParamsUsingGenerics() {
|
||||
doTest("""\
|
||||
import groovy.transform.CompileStatic
|
||||
|
||||
@CompileStatic
|
||||
class Idea {
|
||||
public static void main(String[] args) {
|
||||
["bc", "a", ].sort { i<caret>t.size() }
|
||||
}
|
||||
}""", "java.lang.String")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user