mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 10:07:41 +07:00
when patterns in switch are available GitOrigin-RevId: 1a3458be17a41b492fbae86e186c8792c46a2b12
8 lines
252 B
Java
8 lines
252 B
Java
class X {
|
|
public static double getPerimeter(Shape shape) throws IllegalArgumentException {
|
|
shape<caret>
|
|
}
|
|
}
|
|
interface Shape { }
|
|
record Rectangle(double length, double width) implements Shape { }
|
|
record Circle(double radius) implements Shape { } |