Skip to content

TypeScrambler fails when scrambling generic class #5

Open
@mkaring

Description

@mkaring

Describe the bug
The type scrambler causes and error together with the renaming when handling methods in a generic class, because it does not handle the generic parameters of the class itself properly.

To Reproduce
Steps to reproduce the behavior:

  1. Have an assembly that contains a class like this: https://github.com/mkaring/ConfuserEx/blob/feature/typescrambler_unittest/Tests/TypeScrambler/GenericClass.cs
  2. Try to have the type scrambler process it. Be sure that the Confuser.Rename assembly is loaded and active as well, because it's AnalyzePhase raises the error.

Expected behavior
Should work without errors.

Additional context
My best guess is that the scrambler does not consider the generic parameter of the class at this point.
The result of the UnitTest, including the error is here:
https://ci.appveyor.com/project/mkaring/confuserex/build/13#L289

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions