Merge pull request #5288 from lambdageek/bug-58454
[mono.git] / mono / metadata / class-internals.h
index 7d85d8ce84f9010140021b975b495d572b119b81..39061bd142a1ec1e5411aaee98f7848babe99d1b 100644 (file)
@@ -390,6 +390,9 @@ typedef struct {
 typedef struct {
        MonoClassDef class;
        MonoGenericContainer *generic_container;
+       /* The canonical GENERICINST where we instantiate a generic type definition with its own generic parameters.*/
+       /* Suppose we have class T`2<A,B> {...}.  canonical_inst is the GTD T`2 applied to A and B. */
+       MonoType canonical_inst;
 } MonoClassGtd;
 
 typedef struct {
@@ -1444,6 +1447,9 @@ mono_class_try_get_generic_container (MonoClass *klass);
 void
 mono_class_set_generic_container (MonoClass *klass, MonoGenericContainer *container);
 
+MonoType*
+mono_class_gtd_get_canonical_inst (MonoClass *klass);
+
 guint32
 mono_class_get_first_method_idx (MonoClass *klass);