Browse Source

IParameter.Attributes should always be non-null.

pull/1198/head
Siegfried Pammer 7 years ago
parent
commit
1f04729491
  1. 3
      ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultParameter.cs

3
ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultParameter.cs

@ -43,6 +43,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
throw new ArgumentNullException("name"); throw new ArgumentNullException("name");
this.type = type; this.type = type;
this.name = name; this.name = name;
this.attributes = EmptyList<IAttribute>.Instance;
} }
public DefaultParameter(IType type, string name, IParameterizedMember owner = null, IReadOnlyList<IAttribute> attributes = null, public DefaultParameter(IType type, string name, IParameterizedMember owner = null, IReadOnlyList<IAttribute> attributes = null,
@ -55,7 +56,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
this.type = type; this.type = type;
this.name = name; this.name = name;
this.owner = owner; this.owner = owner;
this.attributes = attributes; this.attributes = attributes ?? EmptyList<IAttribute>.Instance;
this.isRef = isRef; this.isRef = isRef;
this.isOut = isOut; this.isOut = isOut;
this.isParams = isParams; this.isParams = isParams;

Loading…
Cancel
Save