Resolve annotations on parameters of function type
This commit is contained in:
@@ -244,7 +244,7 @@ class TypeResolver(
|
||||
val parameterType = resolveType(c.noBareTypes(), parameter.typeReference!!)
|
||||
val descriptor = ParameterOfFunctionTypeDescriptor(
|
||||
c.scope.ownerDescriptor,
|
||||
Annotations.EMPTY,
|
||||
annotationResolver.resolveAnnotationsWithoutArguments(c.scope, parameter.modifierList, c.trace),
|
||||
parameter.nameAsSafeName,
|
||||
parameterType,
|
||||
parameter.toSourceElement()
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
fun <K, V> intercept(<warning>block</warning>: (<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: A"><error descr="[UNSUPPORTED] Unsupported [annotation on parameter in function type]">@A</error></error> key: K, (K) -> V) -> V) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun <K, V> intercept(<warning>block</warning>: (@A K, (K) -> V) -> V) {
|
||||
|
||||
}
|
||||
|
||||
annotation class A
|
||||
@@ -394,6 +394,18 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AnnotationOnNamedParameterOfFunctionType.kt")
|
||||
public void testAnnotationOnNamedParameterOfFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AnnotationOnNamedParameterOfFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AnnotationOnParameterOfFunctionType.kt")
|
||||
public void testAnnotationOnParameterOfFunctionType() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AnnotationOnParameterOfFunctionType.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("AssignmentsUnderOperators.kt")
|
||||
public void testAssignmentsUnderOperators() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/regression/AssignmentsUnderOperators.kt");
|
||||
|
||||
Reference in New Issue
Block a user