pMixins icon indicating copy to clipboard operation
pMixins copied to clipboard

Mixed in Attributes Constructor parameters - does not mixin `typeof` parameters

Open ppittle opened this issue 10 years ago • 0 comments

Given an Attribute:

public class CustomAttribute : Attribute 
{
      public CustomAttribute(Type example){}

      public Type OtherType {get;set;}
}

Given a Mixin:

public class Mixin {
     [CustomAttribute(typeof(object), OtherType = typeof(string)]
     public string Property{get;set;}
}

Given a Target:

[pMixin(Mixin = typeof(Mixin))]
public partial class Target{}

CustomAttribute is not correctly decorated mixed in Property.

Is:

[CustomAttribute(null, OtherType = null)]
public virtual global::string Property {}

Should be:

[CustomAttribute(typeof(object), OtherType = typeof(string))]
public virtual global::string Property {}

ppittle avatar Feb 02 '15 10:02 ppittle