diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ForceResolveUtil.java b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ForceResolveUtil.java index d1907bdddae..d42a9d74d6e 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ForceResolveUtil.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/resolve/lazy/ForceResolveUtil.java @@ -83,19 +83,21 @@ public class ForceResolveUtil { } } - public static void forceResolveAllContents(@Nullable JetType type) { - if (type == null) return; + @Nullable + public static JetType forceResolveAllContents(@Nullable JetType type) { + if (type == null) return null; if (type instanceof FlexibleType) { FlexibleType flexibleType = (FlexibleType) type; forceResolveAllContents(flexibleType.getLowerBound()); forceResolveAllContents(flexibleType.getUpperBound()); - return; } - - forceResolveAllContents(type.getConstructor()); - for (TypeProjection projection : type.getArguments()) { - forceResolveAllContents(projection.getType()); + else { + forceResolveAllContents(type.getConstructor()); + for (TypeProjection projection : type.getArguments()) { + forceResolveAllContents(projection.getType()); + } } + return type; } }