|
@@ -5,7 +5,8 @@
|
5
|
5
|
*/
|
6
|
6
|
package org.openzen.zenscript.javashared.prepare;
|
7
|
7
|
|
8
|
|
-import org.openzen.zenscript.javashared.JavaNativeClass;
|
|
8
|
+import org.openzen.zenscript.codemodel.generic.TypeParameter;
|
|
9
|
+import org.openzen.zenscript.javashared.*;
|
9
|
10
|
import org.openzen.zenscript.codemodel.HighLevelDefinition;
|
10
|
11
|
import org.openzen.zenscript.codemodel.definition.AliasDefinition;
|
11
|
12
|
import org.openzen.zenscript.codemodel.definition.ClassDefinition;
|
|
@@ -19,11 +20,6 @@ import org.openzen.zenscript.codemodel.definition.VariantDefinition;
|
19
|
20
|
import org.openzen.zenscript.codemodel.member.IDefinitionMember;
|
20
|
21
|
import org.openzen.zenscript.codemodel.type.DefinitionTypeID;
|
21
|
22
|
import org.openzen.zenscript.codemodel.type.TypeID;
|
22
|
|
-import org.openzen.zenscript.javashared.JavaClass;
|
23
|
|
-import org.openzen.zenscript.javashared.JavaCompiledModule;
|
24
|
|
-import org.openzen.zenscript.javashared.JavaContext;
|
25
|
|
-import org.openzen.zenscript.javashared.JavaMethod;
|
26
|
|
-import org.openzen.zenscript.javashared.JavaModifiers;
|
27
|
23
|
|
28
|
24
|
/**
|
29
|
25
|
*
|
|
@@ -64,7 +60,7 @@ public class JavaPrepareDefinitionMemberVisitor implements DefinitionVisitor<Jav
|
64
|
60
|
public JavaClass visitClass(ClassDefinition definition) {
|
65
|
61
|
if (isPrepared(definition))
|
66
|
62
|
return context.getJavaClass(definition);
|
67
|
|
-
|
|
63
|
+
|
68
|
64
|
return visitClassCompiled(definition, true, JavaClass.Kind.CLASS);
|
69
|
65
|
}
|
70
|
66
|
|
|
@@ -134,6 +130,11 @@ public class JavaPrepareDefinitionMemberVisitor implements DefinitionVisitor<Jav
|
134
|
130
|
}
|
135
|
131
|
|
136
|
132
|
private JavaClass visitClassCompiled(HighLevelDefinition definition, boolean startsEmpty, JavaClass.Kind kind) {
|
|
133
|
+
|
|
134
|
+ for (TypeParameter typeParameter : definition.typeParameters) {
|
|
135
|
+ module.setTypeParameterInfo(typeParameter, new JavaTypeParameterInfo(-1));
|
|
136
|
+ }
|
|
137
|
+
|
137
|
138
|
if (definition.getSuperType() != null)
|
138
|
139
|
prepare(definition.getSuperType());
|
139
|
140
|
|