do not allow mapping of error type to JVM type

This commit is contained in:
Stepan Koltsov
2011-12-13 17:52:38 +04:00
parent ff055399a7
commit ac29a020e2
@@ -248,6 +248,11 @@ public class JetTypeMapper {
}
DeclarationDescriptor descriptor = jetType.getConstructor().getDeclarationDescriptor();
if (ErrorUtils.isError(descriptor)) {
throw new IllegalStateException("should not compile an error type");
}
if (standardLibrary.getArray().equals(descriptor)) {
if (jetType.getArguments().size() != 1) {
throw new UnsupportedOperationException("arrays must have one type argument");