FIR JvmMappedScope: substitute type parameters in Java scope with Kotlin ones

Without it, override mapping does not work properly.
NB: at this moment Java forEach often supersedes Kotlin forEach,
because call isn't reported as erroneous properly.
This commit is contained in:
Mikhail Glukhikh
2019-11-28 12:36:56 +03:00
parent 2c611d75bc
commit e43a1ee1c5
8 changed files with 107 additions and 7 deletions
@@ -100,7 +100,7 @@ class JavaSymbolProvider(
useLazyNestedClassifierScope = regularClass is FirJavaClass,
existingNames = (regularClass as? FirJavaClass)?.existingNestedClassifierNames
)
val wrappedDeclaredScope = wrapScopeWithJvmMapped(regularClass.classId, declaredScope, useSiteSession, scopeSession)
val wrappedDeclaredScope = wrapScopeWithJvmMapped(regularClass, declaredScope, useSiteSession, scopeSession)
val superTypeEnhancementScopes =
lookupSuperTypes(regularClass, lookupInterfaces = true, deep = false, useSiteSession = useSiteSession)
.mapNotNull { useSiteSuperType ->