Skip to content
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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Compiler/Service/SemanticClassification.fs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ type SemanticClassificationType =
| TypeDef = 35
| Plaintext = 36

[<RequireQualifiedAccess>]
[<Struct>]
type SemanticClassificationItem =
val Range: range
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Service/SemanticClassification.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type SemanticClassificationType =
| TypeDef = 35
| Plaintext = 36

[<RequireQualifiedAccess>]
[<Struct>]
type SemanticClassificationItem =
val Range: range
Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Utilities/illib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ open System.Runtime.CompilerServices
type InterruptibleLazy<'T> private (value, valueFactory: unit -> 'T) =
let syncObj = obj ()

[<VolatileField>]
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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

let mutable valueFactory = valueFactory

let mutable value = value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ type ProjectRequest = ProjectAction * AsyncReplyChannel<SyntheticProject>

type FuzzingEvent = StartedChecking | FinishedChecking of bool | AbortedChecking of string | ModifiedImplFile | ModifiedSigFile

[<RequireQualifiedAccess>]
type SignatureFiles = Yes = 1 | No = 2 | Some = 3

let fuzzingTest seed (project: SyntheticProject) = task {
Expand Down
1 change: 0 additions & 1 deletion tests/service/data/TestTP/ProvidedTypes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3220,7 +3220,6 @@ module internal AssemblyReader =
systemRuntimeScopeRef: ILScopeRef }
override __.ToString() = "<ILGlobals>"

[<AutoOpen>]
[<Struct>]
type ILTableName(idx: int) =
member __.Index = idx
Expand Down
Loading