Fix a bug where kotlin common classes were seen as missing dependencies

When kotlin referred to them through java signatures
Java resolver ignores expect classes

 #KT-24185 Fixed
This commit is contained in:
Pavel V. Talanov
2018-08-17 18:10:08 +02:00
parent 7087a1b3f5
commit 3a8499b10e
19 changed files with 197 additions and 2 deletions
@@ -29,7 +29,8 @@ abstract class AbstractJavaResolverCache(private val resolveSession: ResolveSess
protected val trace: BindingTrace get() = resolveSession.trace
override fun getClassResolvedFromSource(fqName: FqName): ClassDescriptor? {
return trace.get(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, fqName.toUnsafe()) ?: findInPackageFragments(fqName)
return trace.get(BindingContext.FQNAME_TO_CLASS_DESCRIPTOR, fqName.toUnsafe())?.takeUnless { it.isExpect }
?: findInPackageFragments(fqName)
}
private fun findInPackageFragments(fullFqName: FqName): ClassDescriptor? {