java.interop
java.interop copied to clipboard
`generator` needs to sanely fixup method override visibility
trafficstars
From: https://developercommunity.visualstudio.com/content/problem/323704/android-binding-project-does-not-convert-to-c-visi.html
Given this which C# doesn't support:
public class MyBaseClass
{
protected void DoSomething () { ... }
}
public class MyChildClass extends MyClass {
@Override
public void DoSomething() { ... }
}
There are 2 options:
- Change
MyChildClass.DoSomething ()toprotectedto match the base class - Use method hiding by declaring a new
virtualmethod instead ofoverride
Today we do number 2, which results in this warning:
warning CS0114: 'MyChildClass.DoSomething()' hides inherited member 'MyBaseClass.DoSomething()'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword.
What is the goal of this issue?
- Do option 1
- Add the
newkeyword to our current method to remove the warning
We should do (2) and emit new to remove the CS0114 warning.