Skip to content

Commit 4779643

Browse files
committed
Fix tests.
We have to return the value of the parent type column in the map table, not the row to the map table itself.
1 parent 1a5769c commit 4779643

File tree

1 file changed

+4
-4
lines changed
  • src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal

1 file changed

+4
-4
lines changed

src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/Internal/Tables.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ internal TypeDefinitionHandle FindTypeContainingEvent(int eventRowId, int number
12281228
{
12291229
if (eventRowId <= numberOfEvents)
12301230
{
1231-
return TypeDefinitionHandle.FromRowId(numOfRows);
1231+
return GetParentType(numOfRows);
12321232
}
12331233

12341234
return default(TypeDefinitionHandle);
@@ -1252,7 +1252,7 @@ internal TypeDefinitionHandle FindTypeContainingEvent(int eventRowId, int number
12521252
}
12531253
}
12541254

1255-
return TypeDefinitionHandle.FromRowId(row);
1255+
return GetParentType(row);
12561256
}
12571257
}
12581258

@@ -1399,7 +1399,7 @@ internal TypeDefinitionHandle FindTypeContainingProperty(int propertyRowId, int
13991399
{
14001400
if (propertyRowId <= numberOfProperties)
14011401
{
1402-
return TypeDefinitionHandle.FromRowId(numOfRows);
1402+
return GetParentType(numOfRows);
14031403
}
14041404

14051405
return default(TypeDefinitionHandle);
@@ -1423,7 +1423,7 @@ internal TypeDefinitionHandle FindTypeContainingProperty(int propertyRowId, int
14231423
}
14241424
}
14251425

1426-
return TypeDefinitionHandle.FromRowId(row);
1426+
return GetParentType(row);
14271427
}
14281428
}
14291429

0 commit comments

Comments
 (0)