0xd4d / dnlib

Reads and writes .NET assemblies and modules
MIT License
2.14k stars 583 forks source link

Should we update ReturnParameter when updating ReturnType? #546

Closed CreateAndInject closed 7 months ago

CreateAndInject commented 7 months ago

https://github.com/0xd4d/dnlib/blob/71946df40541d1d97f62e249f3f39036e04e60da/src/DotNet/MethodDef.cs#L493-L500

        public TypeSig ReturnType {
            get => MethodSig?.RetType;
            set {
                var ms = MethodSig;
                if (ms is not null)
                    ms.RetType = value;
                parameterList.ReturnParameter.Type = value;
            }
        }
wtfsck commented 7 months ago

Makes sense.

wtfsck commented 7 months ago

Fixed by #549