mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00

* Fix Issue 23284 - better floating point error messages. There was also a bug here in that real literals did not get a suffix attached. * Replace an array lookup with a ternary, more tests
12 lines
481 B
D
12 lines
481 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/lexer5.d(11): Error: number `1e-100f` is not representable as a `float`
|
|
fail_compilation/lexer5.d(11): https://dlang.org/spec/lex.html#floatliteral
|
|
fail_compilation/lexer5.d(12): Error: number `1e-10024` is not representable as a `double`
|
|
fail_compilation/lexer5.d(12): `real` literals can be written using the `L` suffix. https://dlang.org/spec/lex.html#floatliteral
|
|
---
|
|
*/
|
|
|
|
static float f = 1e-100f;
|
|
static float f2 = 1e-10024;
|