Fixed a bug in AttributeBuilder where setting the derived type would not be applied if there wasn't one already set up.
This commit is contained in:
@@ -58,7 +58,10 @@ namespace CodeGenerator {
|
||||
/// </summary>
|
||||
/// <param name="baseType">Fully qualified name from which this is going to be derived</param>
|
||||
public AttributeBuilder DeriveFromClass(string baseType) {
|
||||
_attrDecl.BaseTypes[0] = new(baseType);
|
||||
if (_attrDecl.BaseTypes.Count == 0)
|
||||
_attrDecl.BaseTypes.Add(typeof(Attribute));
|
||||
else
|
||||
_attrDecl.BaseTypes[0] = new(baseType);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user