Skip to content

Commit f804a9d

Browse files
authored
[NativeAOT] Remove dependency of RuntimeType.GUID on generic custom attribute reader (#95212)
Fixes #95184
1 parent f6bd16d commit f804a9d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Runtime/TypeInfos/NativeFormat/NativeFormatRuntimeNamedTypeInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,11 @@ public sealed override bool IsByRefLike
7777
Handle guidStringArgumentHandle = fahEnumerator.Current;
7878
if (fahEnumerator.MoveNext())
7979
continue;
80-
if (!(guidStringArgumentHandle.ParseConstantValue(_reader) is string guidString))
80+
if (guidStringArgumentHandle.HandleType != HandleType.ConstantStringValue)
8181
continue;
82-
return new Guid(guidString);
82+
return new Guid(guidStringArgumentHandle.ToConstantStringValueHandle(_reader).GetString(_reader));
8383
}
8484
}
85-
8685
return null;
8786
}
8887

0 commit comments

Comments
 (0)