You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The signature for checkedMap is: java.util.Map<K, V> checkedMap(java.util.Map<K, V>, java.lang.Class<K>, java.lang.Class<V>)
if you do Collections.checkedMap({}, Foo.class, Bar.class), the constraints are that K = Object and K = Foo, which is impossible and inference fails. Really what we should be doing here is treating {} as a raw type.
The text was updated successfully, but these errors were encountered:
The signature for checkedMap is:
java.util.Map<K, V> checkedMap(java.util.Map<K, V>, java.lang.Class<K>, java.lang.Class<V>)
if you do
Collections.checkedMap({}, Foo.class, Bar.class)
, the constraints are that K = Object and K = Foo, which is impossible and inference fails. Really what we should be doing here is treating {} as a raw type.The text was updated successfully, but these errors were encountered: