Skip to content

Commit 081f213

Browse files
authored
Merge pull request #1125 from Unity-Technologies/unity-master-fix-1111048
get_shared_type now handles situation where enum types are also gener…
2 parents 7998c18 + b2bd7f4 commit 081f213

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mono/mini/mini-generic-sharing.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3545,6 +3545,8 @@ get_shared_type (MonoType *t, MonoType *type)
35453545
ttype = type->type;
35463546
if (type->type == MONO_TYPE_VALUETYPE) {
35473547
ttype = mono_class_enum_basetype (type->data.klass)->type;
3548+
} else if (type->type == MONO_TYPE_GENERICINST && type->data.generic_class->container_class->enumtype) {
3549+
ttype = mono_class_enum_basetype (mono_generic_class_get_class (type->data.generic_class))->type;
35483550
} else if (MONO_TYPE_IS_REFERENCE (type)) {
35493551
ttype = MONO_TYPE_OBJECT;
35503552
} else if (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR) {

0 commit comments

Comments
 (0)