-
Notifications
You must be signed in to change notification settings - Fork 825
AttributeTargets better error message #18641
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
T-Gro
merged 42 commits into
dotnet:main
from
edgarfgp:attr-targets-better-error-message
Jul 10, 2025
Merged
AttributeTargets better error message #18641
T-Gro
merged 42 commits into
dotnet:main
from
edgarfgp:attr-targets-better-error-message
Jul 10, 2025
Conversation
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
923548b
to
379821c
Compare
❗ Release notes required
|
65634b0
to
39b5f4d
Compare
39b5f4d
to
049472b
Compare
75543b9
to
0c55b19
Compare
T-Gro
reviewed
Jun 2, 2025
T-Gro
reviewed
Jun 2, 2025
T-Gro
approved these changes
Jun 19, 2025
…gp/fsharp into attr-targets-better-error-message
auto-merge was automatically disabled
June 19, 2025 20:06
Head branch was pushed to by a user without write access
b913943
to
0910017
Compare
0910017
to
573461c
Compare
Hi @edgarfgp , this must have slipped trough! (I have enabled auto merge and stopped monitoring it here, but it got disabled due to a push). Merging in now, this is definitely a good improvement for F# 10 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
BEFORE
We had one message to fit all the invalid attribute targets messages.
This attribute is not valid for use on this language element
AFTER
We have now:
This attribute cannot be applied to (<one or more targets>). Valid targets are: (<one or more targets>)
e.g.This attribute cannot be applied to struct. Valid targets are: class
This attribute cannot be applied to property, field, return value. Valid targets are: method
This attribute cannot be applied to class. Valid targets are: interface
This attribute cannot be applied to method, property. Valid targets are: field
For cases here F# does not support attributes or still not a valid analysis for attribute targets that we want to enforce. We will still fallback to
This attribute is not valid for use on this language element
.Checklist