Check for overflow in fixed-point precision suffix (#1918)

Fixes #1917
This commit is contained in:
Rangi
2026-04-07 17:06:54 -04:00
committed by GitHub
parent bcff14b596
commit 9b4b4a581b
10 changed files with 60 additions and 36 deletions
+6 -3
View File
@@ -6,6 +6,12 @@ println 12.34_q.5
println 1_2.3_4_q15
println 1.q2
; warning
println 1.000_000_000_000_001
println 1.999_999_999_999_999
println 1.000_000_000_000_001q16
println 1.999_999_999_999_999q.16
; bad
println 12.34q0
println 12.34q_15 ; lexes as `12.34q` (invalid) then symbol `_15`
@@ -14,6 +20,3 @@ println 1_.2
println 1._2
println 1.__2
println 1.2q
println 1.999_999_999_999_999
println 1.999_999_999_999_999q16
println 1.999_999_999_999_999q.16