Files
2022-08-03 12:19:14 +00:00

9 lines
238 B
Java

// "Adapt argument using 'Math.toIntExact()'" "true-preview"
import java.util.*;
class Demo {
void test(List<?> list) {
List<Integer> intList2 = Collections.unmodifiableList(Collections.singletonList(Math.toIntExact(123L)));
}
}