Skip to content

Commit c79d952

Browse files
authored
Fixes in BuildDependencyList (#205)
***NO_CI***
1 parent 697cd3d commit c79d952

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

MetadataProcessor.Shared/nanoAssemblyBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ private HashSet<MetadataToken> BuildDependencyList(MetadataToken token)
895895
{
896896
// Cecil.Mono has a bug providing TypeSpecs Metadata tokens generic parameters variables, so we need to check against our internal table and build one from it
897897
if (_tablesContext.TypeSpecificationsTable
898-
.TryGetTypeReferenceId(arrayType, out ushort arraySpecId))
898+
.TryGetTypeReferenceId(arrayType.GetElementType(), out ushort arraySpecId))
899899
{
900900
// add "fabricated" token for TypeSpec using the referenceId as RID
901901
set.Add(new MetadataToken(TokenType.TypeSpec, arraySpecId));
@@ -1186,7 +1186,7 @@ private HashSet<MetadataToken> BuildDependencyList(MetadataToken token)
11861186
if (ret is ArrayType arr)
11871187
{
11881188
if (_tablesContext.TypeSpecificationsTable.TryGetTypeReferenceId(
1189-
arr,
1189+
arr.GetElementType(),
11901190
out ushort arrRid))
11911191
{
11921192
// add "fabricated" token for TypeSpec using the referenceId as RID

0 commit comments

Comments
 (0)