mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 04:45:04 +07:00
- process super types GitOrigin-RevId: e47d6266ef8579703d7209e2ad8dee472e68ab2d
19 lines
382 B
Java
19 lines
382 B
Java
// "Replace 'c' with pattern variable" "true-preview"
|
|
package org.qw;
|
|
|
|
import java.util.Collection;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
|
|
public class PatternCollection {
|
|
public static void is(Object o) {
|
|
if (o instanceof Set<?> c) {
|
|
System.out.println(c.size());
|
|
}
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
is(Set.of());
|
|
is(List.of());
|
|
}
|
|
} |