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

Attribute serialization doesn't track source indices for params #22372

Open
jcouv opened this issue Sep 27, 2017 · 0 comments
Open

Attribute serialization doesn't track source indices for params #22372

jcouv opened this issue Sep 27, 2017 · 0 comments

Comments

@jcouv
Copy link
Member

jcouv commented Sep 27, 2017

The logic that prepares values for attribute serialization, in the proper order, keeps track of where the value came from in source.
To do so, it uses source indices.
When a default value is used, there is no source indice, so -1 is used.
Currently, for params parameters, -1 is also used. But we should be able to track something better for those too (ie. not -1).

See GetRewrittenAttributeConstructorArguments method in Binder_Attributes.cs.

Those indices are used for reporting errors on well-known attributes (which currently are simple and don't involve params), so this is not blocking or user-visible yet.

Relates to #22231 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant