-
Notifications
You must be signed in to change notification settings - Fork 772
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
Float32 without dot raises error on compile, but no error in editor #9338
Comments
@abelbraaksma , I believe the IDE always uses the preview syntax, whereas the compiler requires a developer to specify a language version of preview to activate that code. If I remember the early discussions on this, it was to match what we believed roslyn did. |
Ah, ok. If that's the case, surprises like the one above when someone uses new syntax in the IDE (not a Preview of VS) are to be expected. I reckon this can be closed then. Btw, @KevinRansom, would you happen to have some time to look into my repro of "our big issue" of locking-up of VS (delay between each keystroke up to many minutes)? Last week I posted a rather small repro, which took several days to get. Since then, it seems the issue has walked off the radar. I'd totally understand if you can't, but it'd be nice to have some feedback on the repro (i.e.: does it repro for you too?), even if you can't look into it further. I mean this issue: #9201. |
@abelbraaksma right now, I am a bit slammed. But I will take a look at the repo and think about things. |
closing per @abelbraaksma |
The following code does not show red squigglies, but throws when compiled:
No red underline:
Expected behavior
If it's an error, it should show as an error.
Actual behavior
No error is shown, but when compiling, it shows:
Known workarounds
Just use a dot in the number. I think it'll compile if you set the
Preview
-flag in the project (as dotless float32 literals are going to be allowed), but I haven't tried that.Related information
This is probably just a glitch from implementing fsharp/fslang-suggestions#750, i.e. this PR: #7839.
I don't expect this to be fixed, as this syntax is expected to be allowed in F# 5 in a few months anyway, but it's a gotcha we should look out for when implementing stuff with the Preview-switch. I mean: in this case, the IDE error-check seems to have been removed and isn't under the Preview-switch, and the rest is, leading to inconsistencies in behavior.
The text was updated successfully, but these errors were encountered: