Add condition for checkNonParenthesizedAnnotationsOnFunctionalType call to except error reporting in stub mode

This commit is contained in:
victor.petukhov
2019-07-18 13:37:18 +03:00
parent 4bad92d28c
commit 60c4eb68ff
@@ -177,7 +177,8 @@ class TypeResolver(
else -> null
}
if (targetType is KtFunctionType && annotationEntries != null) {
// `targetType.stub == null` means that we don't apply this check for files that are built with stubs (that aren't opened in IDE and not in compile time)
if (targetType is KtFunctionType && targetType.stub == null && annotationEntries != null) {
checkNonParenthesizedAnnotationsOnFunctionalType(targetType, annotationEntries, c.trace)
}
}