-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Invalid interface method implementations #310
Comments
From my perspective, everything is fine, except for your decompiler. That's an explicit interface implementation, so it's supposed to be private. It's just not supposed to show an access modifier in the source code. |
I'm guessing one possibility is that the explicit implementation info is not being set (it's a separate field to specify it should inherit from the interface) and so ILSpy is decompiling it wrong. That or one of the combinations of flags ( |
Looked at it again, this seems to be the case (?) Correct example (sharplab):
Cpp2IL output, missing
|
Yup ok, this is an old issue that's resurfaced then. |
This was already mentioned in #cpp2il-support, I'm making this issue for organization.
example:
The method in the interface is public, but the method in the implementing class is private, causing the type to be invalid
(this specific example's error is because UnityEvent`1 extends UnityEventBase which implements ISerializationCallbackReceiver, and it doesn't see the method impl in UnityEventBase)
https://github.com/Unity-Technologies/UnityCsReference/blob/c4a2a4d90d91496bf3d4602778223a0e660c2a56/Runtime/Export/UnityEvent/UnityEvent.cs#L743
The text was updated successfully, but these errors were encountered: