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

Wrong "in" Keyword suggestion when struct is stored in a collection of tuples #258

Open
Aniobodo opened this issue Jun 23, 2022 · 1 comment

Comments

@Aniobodo
Copy link

List<(MyStruct ms, int)> myStructTupleList = new ();

MyMethod(in myStruct)//example method

MyMethod(in myStructTupleList[0].ms) //does not compile with the "in" keyword

@SergeyTeplyakov
Copy link
Owner

Thanks a lot for reporting this issue. I think I'm going to remove the rule that suggests to use the 'in' modifier explicitly, because this is just a matter of preferences and has 0 impact on runtime and I think these analyzers should only report/suggest fixes that affect the runtime behavior of the program and should not have any opinions on style.

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

No branches or pull requests

2 participants