[generator] fix C# compiler warning in every Invoker #217
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.
Context: https://github.com/xamarin/AndroidSupportComponents
When compiling the Xamarin support libraries from source, its binding
projects generate thousands of warnings. Most of these warnings are
noise that could be fixed, and
generatoris just overdue for someimprovement.
My first steps to improve this:
generator-Testsshould fail if there is a C# compilerwarning
AllowWarningsoption forBaseGeneratorTest, since thereare a few tests that generate C# compiler warnings that aren’t
addressed yet. The hope is this feature could be dropped from the tests
eventually.
Invokertypes have a warning of amissing
newkeyword on the generatedclass_reffieldSince
Java.Lang.Objecthas a staticclass_refproperty, allInvokertypes will produce this warning. An
Invokeris generated for anyinterfaceorabstractclass, so you can see how a large bindingproject could run into this warning many times.