Kapt3: Ensure that field types and method return types are not anonymous (KT-14997)

This commit is contained in:
Yan Zhulanow
2016-11-29 20:50:36 +03:00
committed by Yan Zhulanow
parent 01c76153c7
commit b9a0a4f3db
5 changed files with 107 additions and 11 deletions
@@ -92,6 +92,12 @@ open class PartialAnalysisHandlerExtension : AnalysisHandlerExtension {
}
}
}
is FunctionDescriptor -> {
// is body expression (not unit)
if (declaration is KtFunction && !declaration.hasDeclaredReturnType() && !declaration.hasBlockBody()) {
ForceResolveUtil.forceResolveAllContents(descriptor)
}
}
}
}