|
@@ -5,14 +5,8 @@
|
5
|
5
|
*/
|
6
|
6
|
package org.openzen.zenscript.codemodel.type;
|
7
|
7
|
|
8
|
|
-import org.openzen.zenscript.codemodel.GenericName;
|
9
|
|
-import java.util.Arrays;
|
10
|
|
-import java.util.HashMap;
|
11
|
|
-import java.util.List;
|
12
|
|
-import java.util.Map;
|
13
|
|
-import java.util.Objects;
|
14
|
|
-import java.util.Set;
|
15
|
8
|
import org.openzen.zenscript.codemodel.GenericMapper;
|
|
9
|
+import org.openzen.zenscript.codemodel.GenericName;
|
16
|
10
|
import org.openzen.zenscript.codemodel.HighLevelDefinition;
|
17
|
11
|
import org.openzen.zenscript.codemodel.definition.AliasDefinition;
|
18
|
12
|
import org.openzen.zenscript.codemodel.definition.EnumDefinition;
|
|
@@ -21,6 +15,13 @@ import org.openzen.zenscript.codemodel.definition.VariantDefinition;
|
21
|
15
|
import org.openzen.zenscript.codemodel.generic.TypeParameter;
|
22
|
16
|
import org.openzen.zenscript.codemodel.type.storage.StorageTag;
|
23
|
17
|
|
|
18
|
+import java.util.Arrays;
|
|
19
|
+import java.util.HashMap;
|
|
20
|
+import java.util.List;
|
|
21
|
+import java.util.Map;
|
|
22
|
+import java.util.Objects;
|
|
23
|
+import java.util.Set;
|
|
24
|
+
|
24
|
25
|
/**
|
25
|
26
|
*
|
26
|
27
|
* @author Hoofdgebruiker
|
|
@@ -42,7 +43,7 @@ public class DefinitionTypeID implements TypeID {
|
42
|
43
|
if (typeArguments == null)
|
43
|
44
|
throw new NullPointerException("typeParameters cannot be null");
|
44
|
45
|
if (typeArguments.length != definition.getNumberOfGenericParameters())
|
45
|
|
- throw new IllegalArgumentException("Wrong number of type parameters!");
|
|
46
|
+ throw new IllegalArgumentException("Wrong number of type parameters! " + definition.name + " expected: " + definition.getNumberOfGenericParameters() + " got: " + typeArguments.length);
|
46
|
47
|
if (definition.isInnerDefinition() && !definition.isStatic() && outer == null)
|
47
|
48
|
throw new IllegalArgumentException("Inner definition requires outer instance");
|
48
|
49
|
if ((!definition.isInnerDefinition() || definition.isStatic()) && outer != null)
|