[metadata] If a GTD appears uninstantiated in a generic instantiation argument,
authorAleksey Kliger <aleksey@xamarin.com>
Thu, 20 Apr 2017 22:54:40 +0000 (18:54 -0400)
committerAleksey Kliger <aleksey@xamarin.com>
Thu, 20 Apr 2017 22:58:31 +0000 (18:58 -0400)
commitee13c84852c337a6808826e3ec58b0b54c8c029e
tree18a34e34f994dbfd263db6254ebfa1bf9ed2a9e5
parent7111c840b9354df71bbf08d9dfd686d5051e3935
[metadata] If a GTD appears uninstantiated in a generic instantiation argument,
replace it by its canonical open instantiation.

If we have
```
  class Foo<A,B,C> { ... }
  class Bar<T,U> { ... }
```

Then if someone tries to construct `Bar<Foo, int>` (or more precisely, the
MonoGenericInst corresponding to `<Foo, int>` instead return `Bar< Foo<A,B,C>, int >`.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=54485
mono/metadata/metadata.c