Compare commits
2 Commits
2221b559ca
...
662756ac18
Author | SHA1 | Date | |
---|---|---|---|
662756ac18 | |||
b0bf41968e |
13
resources/bytecode/javFiles/Bug325.jav
Normal file
13
resources/bytecode/javFiles/Bug325.jav
Normal file
@ -0,0 +1,13 @@
|
||||
import java.lang.Integer;
|
||||
import java.util.function.Function;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class Bug325 {
|
||||
public main() {
|
||||
List<Integer> list = new ArrayList<>(List.of(1,2,3,4,5));
|
||||
var func = x -> x*2;
|
||||
return list.stream().map(func).toList();
|
||||
}
|
||||
}
|
@ -1085,6 +1085,13 @@ public class TestComplete {
|
||||
var res = clazz.getDeclaredMethod("convert", List.class).invoke(instance, list);
|
||||
assertEquals(res, List.of(6, 7, 8));
|
||||
}
|
||||
@Test
|
||||
public void testBug325() throws Exception {
|
||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug325.jav");
|
||||
var clazz = classFiles.get("Bug325");
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
clazz.getDeclaredMethod("main").invoke(instance);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBug326() throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user