Skip to content

Commit

Permalink
[mono] Improve how EnumBuilder handles type attributes (dotnet#33389)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexischr authored Mar 12, 2020
1 parent 0eb33d5 commit 26a1607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal EnumBuilder (ModuleBuilder mb, string name, TypeAttributes visibility,
typeof(Enum), null, PackingSize.Unspecified, 0, null);
_underlyingType = underlyingType;
_underlyingField = _tb.DefineField ("value__", underlyingType,
(FieldAttributes.SpecialName | FieldAttributes.Private | FieldAttributes.RTSpecialName));
FieldAttributes.Public | FieldAttributes.SpecialName | FieldAttributes.RTSpecialName);
setup_enum_type (_tb);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal FieldBuilder (TypeBuilder tb, string fieldName, Type type, FieldAttribu
if (type == null)
throw new ArgumentNullException ("type");

attrs = attributes;
attrs = attributes & ~FieldAttributes.ReservedMask;
name = fieldName;
this.type = type;
this.modReq = modReq;
Expand Down

0 comments on commit 26a1607

Please sign in to comment.