From 3161eb284b52803c242301d7e9acf390ad3f313d Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Wed, 3 Dec 2014 20:12:44 +0300 Subject: [PATCH] Added comment --- idea/ide-common/src/org/jetbrains/jet/plugin/util/FuzzyType.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/idea/ide-common/src/org/jetbrains/jet/plugin/util/FuzzyType.kt b/idea/ide-common/src/org/jetbrains/jet/plugin/util/FuzzyType.kt index 262c0213c64..6e41fa83c46 100644 --- a/idea/ide-common/src/org/jetbrains/jet/plugin/util/FuzzyType.kt +++ b/idea/ide-common/src/org/jetbrains/jet/plugin/util/FuzzyType.kt @@ -102,6 +102,8 @@ class FuzzyType( } if (constraintSystem.getStatus().isSuccessful() && ConstraintsUtil.checkBoundsAreSatisfied(constraintSystem, true)) { + // currently ConstraintSystem return successful status in case there are problems with nullability + // that's why we have to check subtyping manually val substitutor = constraintSystem.getResultingSubstitutor() val substitutedType = substitutor.substitute(type, Variance.INVARIANT) return if (substitutedType != null && substitutedType.checkInheritance(otherType)) substitutor else null