Skip to content

Commit 46ec21d

Browse files
authored
Remove DATATYPE_GENERIC (#123)
***NO_CI***
1 parent 2e82f9c commit 46ec21d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

MetadataProcessor.Core/Tables/nanoSignaturesTable.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,11 @@ public void WriteDataType(
349349
return;
350350
}
351351

352-
if (typeDefinition.IsGenericParameter|| typeDefinition.IsGenericInstance)
352+
if (typeDefinition.IsGenericParameter)
353353
{
354-
writer.WriteByte((byte)nanoCLR_DataType.DATATYPE_GENERIC);
354+
// generic parameter should be declared as object
355+
// the CLR is able to resolve to the correct type
356+
writer.WriteByte((byte)nanoCLR_DataType.DATATYPE_OBJECT);
355357
return;
356358
}
357359

MetadataProcessor.Core/Utility/nanoCLR_DataType.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public enum nanoCLR_DataType : byte
4747
DATATYPE_LAST_PRIMITIVE = DATATYPE_STRING,
4848

4949
DATATYPE_OBJECT, // Shortcut for System.Object
50-
DATATYPE_GENERIC = DATATYPE_OBJECT,
5150
DATATYPE_CLASS, // CLASS <class Token>
5251
DATATYPE_VALUETYPE, // VALUETYPE <class Token>
5352
DATATYPE_SZARRAY, // Shortcut for single dimension zero lower bound array SZARRAY <type>

0 commit comments

Comments
 (0)