-
Notifications
You must be signed in to change notification settings - Fork 833
Attribute targets on records #17207
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
Merged
vzarytovskii
merged 24 commits into
dotnet:main
from
edgarfgp:attribute-targets-on-records
Jul 8, 2024
Merged
Attribute targets on records #17207
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4720fac
Initial test
edgarfgp e14eb37
Update record check for targets
edgarfgp f0cd5d5
More tests
edgarfgp f42a88c
Merge branch 'main' into attribute-targets-on-records
edgarfgp ffb497b
Check Record fields
edgarfgp 669ee19
release notes
edgarfgp 670972a
Merge branch 'main' into attribute-targets-on-records
edgarfgp d43956f
Extend DefaultValueAttribute to use AttributeTargets.Property
edgarfgp cd582b6
revert DefaultValueAttribute changes
edgarfgp 74e1342
TcFieldDecl
edgarfgp 071611a
update tests
edgarfgp 476f236
Merge branch 'main' into attribute-targets-on-records
edgarfgp 3ea80b3
update tests
edgarfgp 6e555a5
update test
edgarfgp 5a0b1c1
Update StructAttribute to also AttributeTargets.Class
edgarfgp 389439c
Merge branch 'main' into attribute-targets-on-records
edgarfgp 0062acb
Update 8.0.400.md
psfinaki a0f3acf
Add clarifying comment
edgarfgp a63a322
Merge branch 'main' into attribute-targets-on-records
edgarfgp cc7cc4a
Merge branch 'main' into attribute-targets-on-records
edgarfgp 207ac3b
Merge branch 'main' into attribute-targets-on-records
edgarfgp 993958e
Merge branch 'main' into attribute-targets-on-records
edgarfgp be11382
Merge branch 'main' into attribute-targets-on-records
edgarfgp 5c6c7c8
We do not check for RQA attribute
edgarfgp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -7,4 +7,4 @@ type PropertyLevelAttribute() = | |
|
|
||
| type U = | ||
| | [<PropertyLevel>] A | ||
| | [<PropertyLevel>] B | ||
| | [<PropertyLevel>] B | ||
This file contains hidden or 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
24 changes: 24 additions & 0 deletions
24
...rmance/BasicGrammarElements/CustomAttributes/AttributeUsage/E_AttributeTargetIsClass02.fs
This file contains hidden or 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,24 @@ | ||
| open System | ||
|
|
||
| [<AttributeUsage(AttributeTargets.Class)>] | ||
| type ClassTargetAttribute() = | ||
| inherit Attribute() | ||
|
|
||
| [<AttributeUsage(AttributeTargets.Interface)>] | ||
| type InterfaceTargetAttribute() = | ||
| inherit Attribute() | ||
|
|
||
| [<AttributeUsage(AttributeTargets.Struct)>] | ||
| type StructTargetAttribute() = | ||
| inherit Attribute() | ||
|
|
||
| [<InterfaceTarget>] | ||
| [<StructTarget>] | ||
| [<ClassTarget>] | ||
| type Record = { Prop: string } | ||
|
|
||
| [<ClassTarget>] | ||
| [<InterfaceTarget>] | ||
| [<StructTarget>] | ||
| [<Struct>] | ||
psfinaki marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| type StructRecord = { Prop: string } | ||
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.