mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 02:09:59 +07:00
[java-intention] Intersection type test for IDEA-314907
GitOrigin-RevId: 90316415e2fff0e298ee2026f1e21f278c896c0d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
016dd2e15d
commit
5ab495db61
@@ -0,0 +1,12 @@
|
||||
// "Create method 'newMethod'" "true-preview"
|
||||
import java.util.Objects;
|
||||
|
||||
class X {
|
||||
<T extends Serializable & Cloneable> void intersection() {
|
||||
T t = Objects.requireNonNull(newMethod());
|
||||
}
|
||||
|
||||
private <T extends Serializable & Cloneable> T newMethod() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Create method 'newMethod'" "true-preview"
|
||||
import java.util.Objects;
|
||||
|
||||
class X {
|
||||
<T extends Serializable & Cloneable> void intersection() {
|
||||
T t = Objects.requireNonNull(<caret>newMethod());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user