From b5086b44f0e7f0a6854fcf86eccdade7a6aef50a Mon Sep 17 00:00:00 2001 From: nitrix Date: Tue, 4 Feb 2020 19:16:41 +0100 Subject: [PATCH] return a struct type if no primitive type with the given name was found --- src/main/java/de/hsrm/compiler/Klang/types/Type.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/hsrm/compiler/Klang/types/Type.java b/src/main/java/de/hsrm/compiler/Klang/types/Type.java index 75a8157..cfd4791 100644 --- a/src/main/java/de/hsrm/compiler/Klang/types/Type.java +++ b/src/main/java/de/hsrm/compiler/Klang/types/Type.java @@ -21,7 +21,7 @@ public abstract class Type { case "bool": return getBooleanType(); case "int": return getIntegerType(); case "float": return getFloatType(); - default: throw new RuntimeException("Unknown type " + name); + default: return new StructType(name); } }