mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
testdata for IDEA-250434
GitOrigin-RevId: 2971531084debcf848f19d970f9beec9b9f702ae
This commit is contained in:
committed by
intellij-monorepo-bot
parent
88739a991c
commit
b5ae17aeda
@@ -0,0 +1,23 @@
|
||||
package foo;
|
||||
|
||||
import java.util.Optional;
|
||||
class Boo {
|
||||
private static class MyGenericClass<L> {
|
||||
public final String field;
|
||||
|
||||
private MyGenericClass(String field) {
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
static MyGenericClass<?> create(String field) {
|
||||
return new MyGenericClass<>(field);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Optional<String> value = Optional.of("value");
|
||||
<error descr="Incompatible types. Found: 'foo.Boo.MyGenericClass<capture<?>>', required: 'foo.Boo.MyGenericClass<java.lang.Integer>'">MyGenericClass<Integer> myClassValue = value.map(MyGenericClass::<Integer>create).orElse(null);</error>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user