View | Details | Raw Unified | Return to bug 445852
Collapse All | Expand All

(-)mono-2.0-1/mono/metadata/class.c (+12 lines)
Lines 5541-5552 Link Here
5541
	char *s = strchr (nested, '/');
5541
	char *s = strchr (nested, '/');
5542
	GList *tmp;
5542
	GList *tmp;
5543
5543
5544
	/* Make sure the parent class has been inited 
5545
	   (required to find the nested classes)
5546
	   I suspect this bug hasn't been found before because typically an
5547
	   instance of the outer class is created before any nested classes
5548
	   are referenced.  This however is not the case in F# code (the
5549
	   problem could also occur in C# as well
5550
	*/
5551
	if(!mono_class_init(class))
5552
	  return NULL;
5553
5544
	if (s) {
5554
	if (s) {
5545
		*s = 0;
5555
		*s = 0;
5546
		s++;
5556
		s++;
5547
	}
5557
	}
5558
5548
	for (tmp = class->nested_classes; tmp; tmp = tmp->next) {
5559
	for (tmp = class->nested_classes; tmp; tmp = tmp->next) {
5549
		found = tmp->data;
5560
		found = tmp->data;
5561
		
5550
		if (strcmp (found->name, nested) == 0) {
5562
		if (strcmp (found->name, nested) == 0) {
5551
			if (s)
5563
			if (s)
5552
				return return_nested_in (found, s);
5564
				return return_nested_in (found, s);

Return to bug 445852