From a47cd50dfb9b8d88abea0baf4122e454d82e09e9 Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Thu, 24 Mar 2011 17:12:24 -0700 Subject: Parse FP literals without coercing to int. This allows parsing 64-bit floats. However, if someone writes a literal that can't be represented precisely in 64 bits, the front-end will accept it while the back-end will (presumably) complain. --- src/test/run-pass/floatlits.rs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/test/run-pass/floatlits.rs (limited to 'src/test') diff --git a/src/test/run-pass/floatlits.rs b/src/test/run-pass/floatlits.rs new file mode 100644 index 00000000..db82b486 --- /dev/null +++ b/src/test/run-pass/floatlits.rs @@ -0,0 +1,8 @@ +fn main() { + auto f = 4.999999999999; + check (f > 4.90); + check (f < 5.0); + auto g = 4.90000000001e-10; + check(g > 5e-11); + check(g < 5e-9); +} \ No newline at end of file -- cgit v1.2.3