-
Notifications
You must be signed in to change notification settings - Fork 847
Fix for some 3180 warnings #841
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
Conversation
|
Hi @mpetruska, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
| @@ -35,12 +35,12 @@ open Microsoft.FSharp.Core.CompilerServices | |||
| /// Unique name generator for stamps attached to lambdas and object expressions | |||
| type Unique = int64 | |||
| //++GLOBAL MUTABLE STATE | |||
| let newUnique = let mutable i = 0L in fun () -> System.Threading.Interlocked.Increment(&i) | |||
| let newUnique = let i = ref 0L in fun () -> System.Threading.Interlocked.Increment(i) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutable is ok, ref also ( there is an old school fan club 😄 )
Maybe there is safer to use ref than remove the warning
👍 for @mpetruska
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, my thoughts exactly. Not too experienced with the build system yet, so I'd rather modify code than build parameters.
|
This can be merged. I'm Ok with making all allocations explicit in the compiler. |
|
@KevinRansom can you check and merge this? the debug build doesnt compile atm |
|
I'll merge this (as I need the debug build in any case) |
|
really thx @dsyme |
This tiny PR contains the fix for issue #840.