[NI] Fix exception: don't try to compute type depth on null type

#KT-32184 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-06-24 14:44:18 +03:00
parent a26cf86af7
commit 60a0cf1fcc
6 changed files with 83 additions and 16 deletions
@@ -129,7 +129,7 @@ class ResolvedAtomCompleter(
val substitutedTypes = returnTypes.filterNotNull()
// we have some unsubstituted types
if (substitutedTypes.isEmpty()) return false
val commonReturnType = CommonSupertypes.commonSupertype(returnTypes)
val commonReturnType = CommonSupertypes.commonSupertype(substitutedTypes)
return commonReturnType.isUnit()
}