Browse Source

Fixed some after-merge issues

kindlich 6 years ago
parent
commit
dfa4d255fb
No known key found for this signature in database

+ 1
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaTypeGenericVisitor.java View File

@@ -61,7 +61,7 @@ public class JavaTypeGenericVisitor implements ITypeVisitor<String> {
61 61
 	public String getGenericMethodSignature(FunctionHeader header) {
62 62
 		return "(" + getGenericSignature(header.parameters) +
63 63
 				")" +
64
-				getGenericSignature(header.returnType);
64
+				getGenericSignature(header.getReturnType());
65 65
 	}
66 66
 
67 67
 

+ 4
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/definitions/JavaDefinitionVisitor.java View File

@@ -173,6 +173,8 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
173 173
 		final JavaClass toClass = variant.getTag(JavaClass.class);
174 174
 		final JavaClassWriter writer = new JavaClassWriter(ClassWriter.COMPUTE_FRAMES);
175 175
 
176
+		final String variantName = variant.name;
177
+
176 178
 
177 179
 		final String ss = "<" + javaTypeGenericVisitor.getGenericSignature(variant.genericParameters) + ">Ljava/lang/Object;";
178 180
 		JavaClassWriter.registerSuperClass(variantName, "java/lang/Object");
@@ -187,6 +189,7 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
187 189
 		for (final VariantDefinition.Option option : options) {
188 190
 			JavaVariantOption optionTag = option.getTag(JavaVariantOption.class);
189 191
 			final JavaClassWriter optionWriter = new JavaClassWriter(ClassWriter.COMPUTE_FRAMES);
192
+			final String optionClassName = variantName + "$" + option.name;
190 193
 			JavaClassWriter.registerSuperClass(optionClassName, variantName);
191 194
 
192 195
 			writer.visitInnerClass(optionTag.variantOptionClass.internalName, optionTag.variantClass.internalName, option.name, Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL);
@@ -232,7 +235,7 @@ public class JavaDefinitionVisitor implements DefinitionVisitor<byte[]> {
232 235
 				final String descriptor = context.getDescriptor(types[i]);
233 236
 				optionInitDescBuilder.append(descriptor);
234 237
 				optionInitSignatureBuilder.append("T").append(((GenericTypeID) types[i]).parameter.name).append(";");
235
-				optionWriter.visitField(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "Field" + i, descriptor, "T" + ((GenericTypeID) types[i]).parameter.name + ";", null).visitEnd();
238
+				optionWriter.visitField(Opcodes.ACC_PUBLIC | Opcodes.ACC_FINAL, "field" + i, descriptor, "T" + ((GenericTypeID) types[i]).parameter.name + ";", null).visitEnd();
236 239
 			}
237 240
 			optionInitDescBuilder.append(")V");
238 241
 			optionInitSignatureBuilder.append(")V");

+ 1
- 2
JavaShared/src/main/java/org/openzen/zenscript/javashared/JavaSynthesizedClassNamer.java View File

@@ -29,8 +29,7 @@ public class JavaSynthesizedClassNamer {
29 29
 	
30 30
 	public static JavaSynthesizedClass createRangeName(RangeTypeID range) {
31 31
 		String signature = getRangeSignature(range);
32
-		String className = signature;
33
-		JavaClass cls = new JavaClass("zsynthetic", className, JavaClass.Kind.CLASS);
32
+		JavaClass cls = new JavaClass("zsynthetic", signature, JavaClass.Kind.CLASS);
34 33
 		return new JavaSynthesizedClass(cls, extractTypeParameters(range));
35 34
 	}
36 35
 	

+ 1
- 1
ScriptingExample/build.gradle View File

@@ -18,5 +18,5 @@ dependencies {
18 18
 	compile project(':JavaBytecodeCompiler')
19 19
 	compile project(':JavaShared')
20 20
 	compile project(':CodeFormatter')
21
-	compile project(':ScriptingHost')
21
+//	compile project(':ScriptingHost')
22 22
 }

Loading…
Cancel
Save