mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-06 14:41:20 +07:00
Fixes IDEA-367190 NotNull annotation when creating local variable references library which is not in the project Also: do not resolve reference for writing to a package GitOrigin-RevId: 31f996515323e250d487bf9b7d343f101d788907
22 lines
506 B
Java
22 lines
506 B
Java
// "Create local variable 'i'" "true-preview"
|
|
|
|
class A {
|
|
String testPattern() {
|
|
BaseInterface<String> i;
|
|
return switch (i)
|
|
{
|
|
case BaseInterface.Record1<String> record1 -> "1";
|
|
case BaseInterface.Record2 record2 -> "2";
|
|
default -> "3";
|
|
};
|
|
}
|
|
}
|
|
|
|
sealed interface BaseInterface<T> permits BaseInterface.Record1, BaseInterface.Record2{
|
|
|
|
final class Record1<T> implements BaseInterface<T> {
|
|
}
|
|
|
|
final class Record2 implements BaseInterface<String> {
|
|
}
|
|
} |