[NI] Support @OnlyInputTypes annotation. #KT-29307 fixed

This commit is contained in:
Dmitriy Novozhilov
2019-03-21 17:36:17 +03:00
parent 0f7e91ff6d
commit e574106799
25 changed files with 474 additions and 32 deletions
@@ -62,6 +62,12 @@ class DiagnosticReporterByTrackingStrategy(
val reportOn = (diagnostic as NonApplicableCallForBuilderInferenceDiagnostic).kotlinCall
trace.reportDiagnosticOnce(Errors.NON_APPLICABLE_CALL_FOR_BUILDER_INFERENCE.on(reportOn.psiKotlinCall.psiCall.callElement))
}
OnlyInputTypesDiagnostic::class.java -> {
val typeVariable = (diagnostic as OnlyInputTypesDiagnostic).typeVariable as? TypeVariableFromCallableDescriptor ?: return
psiKotlinCall.psiCall.calleeExpression?.let {
trace.report(TYPE_INFERENCE_ONLY_INPUT_TYPES.on(it, typeVariable.originalTypeParameter))
}
}
}
}