Skip to content

Commit c0edfa8

Browse files
authored
Fix signature output for type definitions (#37)
1 parent df70105 commit c0edfa8

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

source/MetadataProcessor.Core/Tables/nanoSignaturesTable.cs

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,24 @@ public void WriteDataType(
225225
bool expandEnumType,
226226
bool isTypeDefinition)
227227
{
228-
if (!isTypeDefinition)
228+
if (isTypeDefinition)
229229
{
230-
nanoCLR_DataType dataType;
231-
if (PrimitiveTypes.TryGetValue(typeDefinition.FullName, out dataType))
230+
if (typeDefinition.MetadataType == MetadataType.Object)
232231
{
233-
writer.WriteByte((byte)dataType);
232+
writer.WriteByte((byte)nanoCLR_DataType.DATATYPE_CLASS);
234233
return;
235234
}
235+
else
236+
{
237+
238+
}
239+
}
240+
241+
nanoCLR_DataType dataType;
242+
if (PrimitiveTypes.TryGetValue(typeDefinition.FullName, out dataType))
243+
{
244+
writer.WriteByte((byte)dataType);
245+
return;
236246
}
237247

238248
if (typeDefinition is TypeSpecification)
@@ -283,12 +293,6 @@ public void WriteDataType(
283293
return;
284294
}
285295

286-
if(typeDefinition.MetadataType == MetadataType.Object)
287-
{
288-
writer.WriteByte((byte)nanoCLR_DataType.DATATYPE_CLASS);
289-
return;
290-
}
291-
292296
writer.WriteByte(0x00);
293297
}
294298

0 commit comments

Comments
 (0)