forked from JavaTX/JavaCompilerCore
fix console
This commit is contained in:
parent
49803385cf
commit
e0d71a6003
@ -4,10 +4,13 @@ import java.lang.Integer;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.Optional;
|
||||
|
||||
public class Bug309 {
|
||||
public main() {
|
||||
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9));
|
||||
list.stream().map(x -> x * 2);
|
||||
var res = list.stream().filter(x -> x == 5).map(x -> x * 2).findFirst();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
16
resources/bytecode/javFiles/BugXXX.jav
Normal file
16
resources/bytecode/javFiles/BugXXX.jav
Normal file
@ -0,0 +1,16 @@
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.lang.String;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Predicate;
|
||||
import java.lang.Integer;
|
||||
|
||||
class BugXXX {
|
||||
public main() {
|
||||
List<Integer> i = new ArrayList<>(List.of(1,2,3,4,5,6,7,8,9,10));
|
||||
Optional<Integer> tmp = i.stream().filter(x -> x == 5).map(x -> x*2).findFirst();
|
||||
return tmp;
|
||||
}
|
||||
}
|
@ -705,7 +705,8 @@ public class JavaTXCompiler {
|
||||
|
||||
public void generateBytecode() throws ClassNotFoundException, IOException {
|
||||
for (var file : sourceFiles.keySet()) {
|
||||
generateBytecode(file);
|
||||
var classes = generateBytecode(file);
|
||||
writeClassFile(classes, outputPath, outputPath == null);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user