-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error reporting: provide better literal suffix description #1129
Comments
note also that |
Question: why do |
About |
@vasily-kirichenko I see, what about the one for BigInteger? |
We should not question the syntax here. That is pretty much fixed. This
|
@forki: do you think the proposed error message (check on github itself due to edits) is an enhancement? |
Adding the samples is ok, but as a matter of principle please use sentences, rather than phrases:
It's important to say "include" because the numeric literals are extensible through the QZRING feature. |
PR at #1148 |
Improve numeric literal error - fixes #1129
In the error message the byte literal is wrong: should be 1uy, not 1ui: https://github.com/Microsoft/visualfsharp/blob/44b29e4838d675350da9beccd962a7f952a0f1b8/src/fsharp/FSComp.txt#L980 |
What
This is not a valid numeric literal. Sample formats include 4, 0x4, 0b0100, 4L, 4UL, 4u, 4s, 4us, 4y, 4uy, 4.0, 4.0f, 4I
Why
It is difficult to remember:
How
Bonus point if we instead of 4 we show 42 or the actual value.
This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0b0001 (int), 1u (uint32), 1L (int64), 1UL (uint64), 1s (int16), 1y (sbyte), 1ui (byte), 1.0 (float), 1.0f (float32), 1.0m (decimal), 1I (BigInteger)
#1103
The text was updated successfully, but these errors were encountered: