mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Java: Fix range analysis bug where int was assumed.
This commit is contained in:
@@ -3,4 +3,12 @@ public class C {
|
||||
return (x < 0 || x > 1 || Double.isNaN(x)) ? Double.NaN :
|
||||
x == 0 ? 0 : x == 1 ? 1 : 0.5;
|
||||
}
|
||||
|
||||
void m2(double x) {
|
||||
if (x > 0) {
|
||||
double y = 1 - x;
|
||||
if (y > 0) { // OK
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user