ErrorProne.NET
ErrorProne.NET copied to clipboard
Wrong "in" Keyword suggestion when struct is stored in a collection of tuples
List<(MyStruct ms, int)> myStructTupleList = new ();
MyMethod(in myStruct)//example method
MyMethod(in myStructTupleList[0].ms) //does not compile with the "in" keyword
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.