NI: do type checking for anonymous functions not inside a call

^KT-38890 Fixed
^KT-38439 Fixed
This commit is contained in:
Victor Petukhov
2020-05-19 11:31:15 +03:00
parent 425ce8c3ab
commit eff5f3a242
18 changed files with 174 additions and 25 deletions
@@ -428,9 +428,11 @@ public class TypeUtils {
SmartSet<KotlinType> visited
) {
if (type == null) return false;
if (visited != null && visited.contains(type)) return false;
UnwrappedType unwrappedType = type.unwrap();
if (noExpectedType(type)) return isSpecialType.invoke(unwrappedType);
if (visited != null && visited.contains(type)) return false;
if (isSpecialType.invoke(unwrappedType)) return true;
if (visited == null) {