Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Dublicate assignement on virtual-override #129

Closed
maleet opened this issue Jun 25, 2020 · 3 comments
Closed

Dublicate assignement on virtual-override #129

maleet opened this issue Jun 25, 2020 · 3 comments
Labels
abandon by the reporter Reporter is not responding. Not interested in collaboration. bug Something isn't working fix verification

Comments

@maleet
Copy link

maleet commented Jun 25, 2020

public class BaseModel
{
    public virtual string Expression { get; set; }
}
public class Target : BaseModel
{
    public override string Expression { get; set; }

    public Target Copy(Target target)
    {
        return new Target()
        {
            Expression = target.Expression,
            Expression = target.Expression
        };
    }
}

Generated code have dublicates - two Exporession assignements

@maleet
Copy link
Author

maleet commented Jun 25, 2020

Not related, but there's another bug-like code example:

public class Target
{
    public Other Type { get; set; }

    public Guid Ref { get; set; }
}
/// Generated:
public Target MapTarget(Target target)
{
    return new Target()
    {
        Type = MapOther(target.Type),
        Ref = new Guid(a: 0, b: 0, c: 0, d: 0, e: (byte)target.Ref.GetHashCode(), f: 0, g: target.Ref.ToString(), h: 0, i: 0, j: 0, k: 0),
        Expression = target.Expression
    };
}

@cezarypiatek cezarypiatek added the bug Something isn't working label Jun 25, 2020
@cezarypiatek
Copy link
Owner

Good catch! Thanks for reporting this issue.

@cezarypiatek
Copy link
Owner

@maleet should be fixed in v1.16.411 Please let me know if it's working as expected.

@cezarypiatek cezarypiatek added the abandon by the reporter Reporter is not responding. Not interested in collaboration. label Aug 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
abandon by the reporter Reporter is not responding. Not interested in collaboration. bug Something isn't working fix verification
Projects
None yet
Development

No branches or pull requests

2 participants