(Sequel to issue
Issue: Exactly what the title says.
float f = Double.NEGATIVE_INFINITY;
Const-expr-ness will propagate from
Double.NEGATIVE_INFINITY, which will lead to an attempt to parse
"Infinity". This constant occurs b/c
Double was loaded from a class file; the literal's token was synthesised from the bytecode by
toStringing the F64 value.
Same suggested fix as
#223. The expanded domain of
<F32/F64>.constant() shouldn't be externally visible, so long as the lexer/parser rejects 'Infinity' as a float literal.
PS: Suggested fix doesn't handle various flavours of NaN.
PPS: Might be worth checking out if Java's
toString of floating-point types is guaranteed to round-trip through
parseFloat/Double for finite values. Disappointingly, this doesn't tend to be true for most formatters...