diff options
author | Zoltan Varga <vargaz@gmail.com> | 2004-09-07 16:00:24 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2004-09-07 16:00:24 +0400 |
commit | 9984dde0d9b4cea32b42e0092a150c14e491c5d0 (patch) | |
tree | a6826f730e8e296bbf1fa21be5435dbc5a20c355 | |
parent | 8a918532340d72ff6730a49ed668d12bfbb4da0b (diff) |
2004-09-07 Zoltan Varga <vargaz@freemail.hu>
* reflection.c (mono_reflection_create_runtime_class): Initialize
klass->nested_classes. Fixes #61224.
svn path=/branches/mono-1-0/mono/; revision=33499
-rw-r--r-- | mono/metadata/ChangeLog | 5 | ||||
-rw-r--r-- | mono/metadata/reflection.c | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/mono/metadata/ChangeLog b/mono/metadata/ChangeLog index b12340c0ad1..b1069f1191d 100644 --- a/mono/metadata/ChangeLog +++ b/mono/metadata/ChangeLog @@ -1,3 +1,8 @@ +2004-09-07 Zoltan Varga <vargaz@freemail.hu> + + * reflection.c (mono_reflection_create_runtime_class): Initialize + klass->nested_classes. Fixes #61224. + 2004-09-06 Zoltan Varga <vargaz@freemail.hu> * reflection.c (mono_param_get_objects): Initialize the default value diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c index 2d265b10919..bf22f1f6d4a 100644 --- a/mono/metadata/reflection.c +++ b/mono/metadata/reflection.c @@ -7829,6 +7829,7 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb) { MonoClass *klass; MonoReflectionType* res; + int i; MONO_ARCH_SAVE_REGS; @@ -7839,7 +7840,6 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb) /* * Fields to set in klass: * the various flags: delegate/unicode/contextbound etc. - * nested_classes */ klass->flags = tb->attrs; @@ -7851,6 +7851,13 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb) if (!klass->enumtype) ensure_runtime_vtable (klass); + if (tb->subtypes) { + for (i = 0; i < mono_array_length (tb->subtypes); ++i) { + MonoReflectionTypeBuilder *subtb = mono_array_get (tb->subtypes, MonoReflectionTypeBuilder*, i); + klass->nested_classes = g_list_prepend (klass->nested_classes, my_mono_class_from_mono_type (subtb->type.type)); + } + } + /* fields and object layout */ if (klass->parent) { if (!klass->parent->size_inited) |