Procházet zdrojové kódy

Fixed incorrect method signature on lambda methods

They used the signature instead of the description, so there was an AIOOB when the compiler tried to cast a 'TT;' as that only exists in signatures, not in descriptions
kindlich před 5 roky
rodič
revize
1d49da3a9c
No known key found for this signature in database

+ 1
- 1
JavaBytecodeCompiler/src/main/java/org/openzen/zenscript/javabytecode/compiler/JavaExpressionVisitor.java Zobrazit soubor

@@ -2016,7 +2016,7 @@ public class JavaExpressionVisitor implements ExpressionVisitor<Void>, JavaNativ
2016 2016
 			
2017 2017
 			
2018 2018
 			
2019
-			final JavaMethod actualMethod = new JavaMethod(methodInfo.cls, methodInfo.kind, methodInfo.name, methodInfo.compile, signature, methodInfo.modifiers, methodInfo.genericResult, methodInfo.typeParameterArguments);
2019
+			final JavaMethod actualMethod = new JavaMethod(methodInfo.cls, methodInfo.kind, methodInfo.name, methodInfo.compile, context.getMethodDescriptor(expression.header), methodInfo.modifiers, methodInfo.genericResult, methodInfo.typeParameterArguments);
2020 2020
 			//No @Override
2021 2021
 			functionWriter = new JavaWriter(expression.position, lambdaCW, actualMethod, null, signature, null);
2022 2022
 		} else {

Loading…
Zrušit
Uložit