Coder Social home page Coder Social logo

Comments (2)

wmjordan avatar wmjordan commented on July 17, 2024

And there is a bug when renaming an abstract method which is imported from external assembly.

Please use the following project to reproduce the issue:
ConsoleApp1.zip

Expected result:
CanExtend method in class C should not get renamed.

Related code:

class C<TItem> : B, S<TItem>
{
	public TItem GetT(int key)=> default(TItem);

	public override bool CanExtend(object extendee) {
		throw new NotImplementedException();
	}
}
[Serializable]
abstract class B : System.ComponentModel.IExtenderProvider
{
	public abstract bool CanExtend(object extendee);
}
interface S<TItem> : I<int, TItem> { }
interface I<TKey, TItem> {
	TItem GetT(int key);
}

from neo-confuserex.

nathan-chappell avatar nathan-chappell commented on July 17, 2024

I've found one of the offending lines:

target.MethodSig = new Importer(method.Module, ImporterOptions.TryToUseTypeDefs).Import(method.MethodSig);

I don't know what the purpose of this line is, but when I watch it in debug I see the method signature of the target go from

  1. containing correct indices for generic parameters to
  2. replacing some generic parameters with their instantiations

When I get rid of it, the obfuscated dll works fine. I don't know if that line is actually doing anything important, but it's certainly also breaking something.

from neo-confuserex.

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.