-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Account for
CLIMutableAttribute
when checking attribute targets (#1…
- Loading branch information
Showing
6 changed files
with
114 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/CLIMutableAttribute01.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[<CLIMutable>] | ||
type Record = { X: int } | ||
|
||
[<CLIMutable>] | ||
[<Struct>] | ||
type StructRecord = { X: int } |
35 changes: 35 additions & 0 deletions
35
...Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_CLIMutableAttribute.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
module BogusUseOfCLIMutable = begin | ||
|
||
[<CLIMutable>] | ||
type BadClass() = member x.P = 1 | ||
|
||
[<CLIMutable>] | ||
type BadUnion = A | B | ||
|
||
[<CLIMutable>] | ||
type BadInterface = interface end | ||
|
||
[<CLIMutable>] | ||
type BadClass2 = class end | ||
|
||
[<CLIMutable>] | ||
type BadEnum = | A = 1 | B = 2 | ||
|
||
[<CLIMutable>] | ||
type BadDelegate = delegate of int * int -> int | ||
|
||
[<CLIMutable>] | ||
type BadStruct = struct val x : int end | ||
|
||
[<CLIMutable>] | ||
type BadStruct2(x:int) = struct member v.X = x end | ||
|
||
[<CLIMutable>] | ||
type Good1 = { x : int; y : int } | ||
let good1 = { x = 1; y = 2 } | ||
|
||
[<CLIMutable>] | ||
type Good2 = { x : int } | ||
let good2 = { x = 1 } | ||
|
||
end |