java type system: use captured wildcard bounds in cast context (IDEA-233551)

starting with javac 1.9+ such code starting to compile, javac 8 rejects the code with the same language level used

GitOrigin-RevId: 87a1e4d475927af0ee71cd74f5a66e130908ed82
This commit is contained in:
Anna Kozlova
2020-04-16 19:41:33 +00:00
committed by intellij-monorepo-bot
parent ef5f5bafa1
commit 022c5be762
3 changed files with 3 additions and 2 deletions
@@ -30,6 +30,6 @@ class Foo<T> {
public static void main(String[] args) {
Foo<?> foo = getFoo();
double value = <error descr="Inconvertible types; cannot cast 'capture<?>' to 'double'">(double) foo.getValue()</error>;
double value = (double) foo.getValue();
}
}