Java Flow dsl lower bounds incorrect #24368

This commit is contained in:
Johan Andrén 2018-03-15 14:53:50 +01:00 committed by GitHub
parent a53a09e6ba
commit d8b9bb1b3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 199 additions and 126 deletions

View file

@ -43,10 +43,21 @@ public class FlowTest extends StreamTest {
super(actorSystemResource);
}
@ClassRule
@ClassRule
public static AkkaJUnitActorSystemResource actorSystemResource = new AkkaJUnitActorSystemResource("FlowTest",
AkkaSpec.testConf());
interface Fruit {}
static class Apple implements Fruit {};
static class Orange implements Fruit {};
public void compileOnlyUpcast() {
Flow<Apple, Apple, NotUsed> appleFlow = null;
Flow<Apple, Fruit, NotUsed> appleFruitFlow = Flow.upcast(appleFlow);
Flow<Apple, Fruit, NotUsed> fruitFlow = appleFruitFlow.intersperse(new Orange());
}
@Test
public void mustBeAbleToUseSimpleOperators() {
final TestKit probe = new TestKit(system);