nested conditional expressions: don't require nested to be poly if outer is not

This commit is contained in:
Anna Kozlova
2015-05-13 11:41:23 +02:00
parent 6e46f6ff0a
commit fb0495e4a4
3 changed files with 13 additions and 1 deletions
@@ -0,0 +1,8 @@
import java.util.ArrayList;
import java.util.List;
class C {
public static void main(Object o) {
List l = (List)(o instanceof ArrayList ? (ArrayList)o : o instanceof List ? (List)o : o);
}
}