-
Notifications
You must be signed in to change notification settings - Fork 786
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
Remove invalid attributes #17321
Remove invalid attributes #17321
Conversation
|
@@ -15,7 +15,6 @@ open System.Runtime.CompilerServices | |||
type InterruptibleLazy<'T> private (value, valueFactory: unit -> 'T) = | |||
let syncObj = obj () | |||
|
|||
[<VolatileField>] |
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.
@nojaf Could you please explain why this attribute is invalid?
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.
Yeah, this might be a false positive.
[<AttributeUsage(AttributeTargets.Field, AllowMultiple=false)>]
[<Sealed>]
type VolatileFieldAttribute() =
inherit Attribute()
I would indeed assume it is allowed in this case. But I got an error for it.
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.
@edgarfgp could you take a look please?
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.
I think you are seeing this error because the compiler version is missing this PR https://github.com/dotnet/fsharp/pull/17093/files.
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.
This indeed does not need to be remove when using v9.0.100-preview.5
Might pursue this some other time. |
Description
When adding
<LangVersion>preview</LangVersion>
, these attributes give anerror FS0842: This attribute is not valid for use on this language element
.//cc @edgarfgp
Checklist
Test cases added
Performance benchmarks added in case of performance changes
Release notes entry updated: