Skip to content

Commit

Permalink
Switch to AllowByRefLike naming in Mono as well (#102516)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbevain authored Jun 4, 2024
1 parent 7803a96 commit 9a3d45a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/object-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ typedef enum {
GENERIC_PARAMETER_ATTRIBUTE_REFERENCE_TYPE_CONSTRAINT = 0x0004,
GENERIC_PARAMETER_ATTRIBUTE_VALUE_TYPE_CONSTRAINT = 0x0008,
GENERIC_PARAMETER_ATTRIBUTE_CONSTRUCTOR_CONSTRAINT = 0x0010,
GENERIC_PARAMETER_ATTRIBUTE_ACCEPT_BYREFLIKE_CONSTRAINTS = 0x0020, // type argument can be ByRefLike
GENERIC_PARAMETER_ATTRIBUTE_ALLOW_BYREFLIKE_CONSTRAINTS = 0x0020, // type argument can be ByRefLike
GENERIC_PARAMETER_ATTRIBUTE_SPECIAL_CONSTRAINTS_MASK = 0x003c
} GenericParameterAttributes;

Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ is_valid_generic_instantiation (MonoGenericContainer *gc, MonoGenericContext *co
return FALSE;
}

if (m_class_is_byreflike (paramClass) && (param_info->flags & GENERIC_PARAMETER_ATTRIBUTE_ACCEPT_BYREFLIKE_CONSTRAINTS) == 0)
if (m_class_is_byreflike (paramClass) && (param_info->flags & GENERIC_PARAMETER_ATTRIBUTE_ALLOW_BYREFLIKE_CONSTRAINTS) == 0)
return FALSE;

if (!param_info->constraints && !(param_info->flags & GENERIC_PARAMETER_ATTRIBUTE_SPECIAL_CONSTRAINTS_MASK))
Expand Down

0 comments on commit 9a3d45a

Please sign in to comment.