mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 00:20:54 +07:00
18 lines
263 B
Java
18 lines
263 B
Java
// "Adapt using 'Math.toIntExact()'" "true-preview"
|
|
import java.util.function.*;
|
|
|
|
public class Test {
|
|
|
|
void m() {
|
|
|
|
LongToIntFunction fn = x -> {
|
|
if(x > 0) {
|
|
return Math.toIntExact(x * 2);
|
|
}
|
|
return 0;
|
|
};
|
|
|
|
}
|
|
|
|
}
|