forked from JavaTX/JavaCompilerCore
Upload test for #298
This commit is contained in:
parent
518f58e08f
commit
1f74345324
19
resources/bytecode/javFiles/Bug298.jav
Normal file
19
resources/bytecode/javFiles/Bug298.jav
Normal file
@ -0,0 +1,19 @@
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.lang.Integer;
|
||||
import java.lang.System;
|
||||
import java.io.PrintStream;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.function.Function;
|
||||
|
||||
public class Bug298 {
|
||||
public <R, T> Stream<R> takes(Stream<T> s, Function<? super T, ? super R> fun) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void m() {
|
||||
List<Integer> list = new ArrayList<>();
|
||||
Stream<Integer> a = list.stream();
|
||||
takes(a, x -> 2 * x);
|
||||
}
|
||||
}
|
@ -965,4 +965,11 @@ public class TestComplete {
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
clazz.getDeclaredMethod("exec").invoke(instance);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBug298() throws Exception {
|
||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "Bug298.jav");
|
||||
var clazz = classFiles.get("Bug298");
|
||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user