Add events, fields and properties to concrete generics.

This basically finishes the concrete generics implementation. We can now
enumerate all members of a concrete generic type with full type
substitution implemented.

Also add a simple test to verify that we can obtain the correct type for
a field of a concrete generic type.
This commit is contained in:
Robert Xiao
2020-04-13 06:45:04 -07:00
committed by Katy
parent 1a12567227
commit 4207464208
5 changed files with 98 additions and 15 deletions

View File

@@ -41,6 +41,7 @@ namespace Il2CppInspector
TypeInfo tT = tBase.GenericTypeParameters[0];
TypeInfo tU = tBase.GenericTypeParameters[1];
TypeInfo tF = tDerived.GetField("F").FieldType;
TypeInfo tF_closed = tDerived_closed.GetField("F").FieldType;
TypeInfo tNested = asm.GetType("Il2CppTests.TestSources.Derived`1+Nested");
TypeInfo tNG = asm.GetType("Il2CppTests.TestSources.NonGeneric");
@@ -87,6 +88,7 @@ namespace Il2CppInspector
(tT, "T", false, false, true, true, 0),
(tU, "U", false, false, true, true, 1),
(tF, "G`1[Derived`1[V]]", true, false, true, false, -1),
(tF_closed, "G`1[Derived`1[System.Int32]]", true, false, false, false, -1),
(tNested, "Derived`1[V]+Nested[V]", true, true, true, false, -1),
(tB, "B", false, false, true, true, 0),
(tB.BaseType, "Derived`1[R]", true, false, true, false, -1),