Don't swallow exception in KotlinBuiltIns, assert instead

See 16b6bcc

 #KT-9820 Open
This commit is contained in:
Alexander Udalov
2015-10-29 18:29:15 +03:00
parent 4d909d9012
commit 2c64848826
@@ -870,7 +870,9 @@ public abstract class KotlinBuiltIns {
List<TypeProjection> arguments = type.getArguments();
int first = isExtensionFunctionType(type) ? 1 : 0;
int last = arguments.size() - 2;
List<TypeProjection> parameterTypes = new ArrayList<TypeProjection>(Math.max(0, last - first + 1));
// TODO: fix bugs associated with this here and in neighboring methods, see KT-9820
assert first <= last + 1 : "Not an exact function type: " + type;
List<TypeProjection> parameterTypes = new ArrayList<TypeProjection>(last - first + 1);
for (int i = first; i <= last; i++) {
parameterTypes.add(arguments.get(i));
}