Skip to content
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

GenerateMapper(MapType.Map) with 'print full type name' generates invalid method names #313

Closed
Rans4ckeR opened this issue Feb 25, 2021 · 1 comment

Comments

@Rans4ckeR
Copy link

When mapping classes with the same name in different layers, using this code:

internal sealed class Register : IRegister
{
public void Register(TypeAdapterConfig config)
{
config.NewConfig<X.Y.Z.ClassName, A.B.C.ClassName>().GenerateMapper(MapType.Map);
}
}

The following code is generated when using Mapster.Tool with the -p switch which does not compile:

public static A.B.C.ClassName AdaptToA.B.C.ClassName(this X.Y.Z.ClassName p1) { ... }

Tested using:
Mapster.Tool 8.0.0 & 7.1.3
Mapster 7.1.5 & 7.1.3

@chaowlert
Copy link
Collaborator

Thank you for report. I will release 8.0.1 to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants