mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
fix intersection types in receiver position (IDEA-144472)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
abstract class Constraint<ConstraintType extends Constraint<ConstraintType>> {
|
||||
|
||||
protected abstract Stream<Event> evStream();
|
||||
|
||||
private void foo(final Set<CConstraint> ctrlSTCs,
|
||||
final Set<BConstraint> probCstrs) {
|
||||
ArrayList<Event> a = new ArrayList<Event>(Stream
|
||||
.concat(ctrlSTCs.stream(), probCstrs.stream())
|
||||
.flatMap(Constraint::evStream)
|
||||
.collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
private abstract class CConstraint extends Constraint<CConstraint> implements I {}
|
||||
private abstract class BConstraint extends Constraint<BConstraint> implements I {}
|
||||
|
||||
interface I {}
|
||||
interface Event {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user