-
Notifications
You must be signed in to change notification settings - Fork 220
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
VB -> C#: Explicit interface implementation adds a setter for readonly property. #813
Comments
Your suggestion might well work. To figure it out, it might be best to check the decompilation in SharpLab. See the slightly related #685 |
From a quick look:
The way I'd expect overriding There are some self verifying test cases in the converter which we could add an example to (they are executed in VB, then converted and executed again): |
I'm slowly starting to look into this, first, there is a small code cleanup around the visitors in #821 If this property After conversion: string IUser.Username { get { logic } set { logic } }
protected virtual string Nick { get => ((IUser)this).Username; set => ((IUser)this).Username = value; } Because the converter keeps the logic in the first explicit interface implementation it means that logic |
VB.Net input code
Erroneous output
Expected output
Details
Could the fix be to always keep the getter/setter in a class property and just generate delegate calls from all explicit interface implementations?
The text was updated successfully, but these errors were encountered: