fix casting to primitives according to the spec (IDEA-131107; IDEA-148880)

This commit is contained in:
Anna Kozlova
2015-12-10 17:01:55 +01:00
parent 3f72d428a8
commit 81a6cceb35
5 changed files with 63 additions and 3 deletions
@@ -0,0 +1,17 @@
class Foo<T> {
private T _value;
T getValue() {
return _value;
}
static Foo<?> getFoo() {
return new Foo<>();
}
public static void main(String[] args) {
Foo<?> foo = getFoo();
double value = <error descr="Inconvertible types; cannot cast 'capture<?>' to 'double'">(double) foo.getValue()</error>;
}
}