Giter Site home page Giter Site logo

Comments (4)

ds5678 avatar ds5678 commented on August 30, 2024 1

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.

https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/explicit-interface-implementation

from cpp2il.

SamboyCoding avatar SamboyCoding commented on August 30, 2024 1

Yup ok, this is an old issue that's resurfaced then.

from cpp2il.

SamboyCoding avatar SamboyCoding commented on August 30, 2024

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 (private final hidebysig specialname newslot virtual) is missing.

from cpp2il.

thegu5 avatar thegu5 commented on August 30, 2024

explicit implementation info is not being set

Looked at it again, this seems to be the case (?)

Correct example (sharplab):

    .method private final hidebysig newslot virtual 
        instance void A.Method () cil managed 
    {
        .override method instance void A::Method()
        .maxstack 8

        IL_0000: ret
    }

Cpp2IL output, missing .override:

	.method private final hidebysig newslot virtual 
		instance void UnityEngine.ISerializationCallbackReceiver.OnBeforeSerialize () cil managed 
	{
		.maxstack 8

		IL_0000: ldnull
		IL_0001: throw
	}

from cpp2il.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.