Inject non-context dependent CallCheckers instead of getting them from context
This commit is contained in:
+1
-1
@@ -42,7 +42,7 @@ import org.jetbrains.kotlin.types.TypeUtils
|
||||
import java.lang.annotation.Target
|
||||
|
||||
public class JavaAnnotationCallChecker : CallChecker {
|
||||
override fun <F : CallableDescriptor?> check(resolvedCall: ResolvedCall<F>, context: BasicCallResolutionContext) {
|
||||
override fun <F : CallableDescriptor> check(resolvedCall: ResolvedCall<F>, context: BasicCallResolutionContext) {
|
||||
val resultingDescriptor = resolvedCall.getResultingDescriptor().getOriginal()
|
||||
if (resultingDescriptor !is JavaConstructorDescriptor ||
|
||||
resultingDescriptor.getContainingDeclaration().getKind() != ClassKind.ANNOTATION_CLASS) return
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
|
||||
import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm
|
||||
|
||||
public class JavaAnnotationMethodCallChecker : CallChecker {
|
||||
override fun <F : CallableDescriptor?> check(resolvedCall: ResolvedCall<F>, context: BasicCallResolutionContext) {
|
||||
override fun <F : CallableDescriptor> check(resolvedCall: ResolvedCall<F>, context: BasicCallResolutionContext) {
|
||||
val descriptor = resolvedCall.getCandidateDescriptor().getOriginal()
|
||||
val containingDeclaration = descriptor.getContainingDeclaration()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user