FIR: add more correct handling of Java raw types

This commit is contained in:
Mikhail Glukhikh
2019-10-29 17:57:28 +03:00
parent d4af35d794
commit 34d9959b17
2 changed files with 4 additions and 3 deletions
@@ -179,7 +179,8 @@ private fun JavaClassifierType.enhanceInflexibleType(
} else {
val argEnhancedTypeRef = arg.enhancePossiblyFlexible(session, javaTypeParameterStack, annotations, qualifiers, globalArgIndex)
globalArgIndex += arg.subtreeSize()
argEnhancedTypeRef.type.type.toTypeProjection(Variance.INVARIANT)
// For arg == null (raw type) we take <out Any> to match everything
argEnhancedTypeRef.type.type.toTypeProjection(if (arg == null) Variance.OUT_VARIANCE else Variance.INVARIANT)
}
}