mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 01:09:46 +07:00
lambda: do not accept ? as type argument for return value (IDEA-91369)
This commit is contained in:
@@ -40,4 +40,26 @@ class Test1 {
|
||||
}
|
||||
}</error>;
|
||||
}
|
||||
}
|
||||
|
||||
class Test2 {
|
||||
interface X<T extends Number> {
|
||||
T foo();
|
||||
}
|
||||
|
||||
{
|
||||
X<?> x = <error descr="No instance of type X<?> exists so that lambda expression can be type-checked">() -> 123</error>;
|
||||
X<? extends Number> x1 = () -> 123;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
class Test3 {
|
||||
interface X<T> {
|
||||
T foo();
|
||||
}
|
||||
|
||||
{
|
||||
X<?> x = () -> 123;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user