mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
[intention-preview] Create record on record pattern: fix an exception when the record component pattern list is empty
IDEA-304933 GitOrigin-RevId: f0fe135f3bddf5e5705f76de8ebe095543bd18a8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e056e25116
commit
d0c57ae46f
@@ -0,0 +1,12 @@
|
||||
// "Create record 'EmptyBox'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case EmptyBox() -> System.out.println( "Fill it up and send it back");
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public record EmptyBox() {
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Create record 'EmptyBox'" "true-preview"
|
||||
class Test {
|
||||
void foo(Object obj) {
|
||||
switch (obj) {
|
||||
case Empty<caret>Box() -> System.out.println( "Fill it up and send it back");
|
||||
default -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
public record EmptyBox() {
|
||||
}
|
||||
Reference in New Issue
Block a user