FIR resolve (by semoro): support correct type inference for generic args

This commit includes additional test and fixes e.g.
resolve of listOf() + listOf()
This commit is contained in:
Mikhail Glukhikh
2019-05-21 16:07:27 +03:00
parent 3cede7e827
commit 4d145db9f7
10 changed files with 94 additions and 14 deletions
@@ -179,8 +179,8 @@ class NewConstraintSystemImpl(
return !type.contains {
val capturedType = it.asSimpleType()?.asCapturedType()
// TODO: change NewCapturedType to markered one for FE-IR
val typeToCheck = if (capturedType is NewCapturedType && capturedType.captureStatus() == CaptureStatus.FROM_EXPRESSION)
capturedType.constructor.projection.type
val typeToCheck = if (capturedType is CapturedTypeMarker && capturedType.captureStatus() == CaptureStatus.FROM_EXPRESSION)
capturedType.typeConstructorProjection().getType()
else
it