internal void MergeWith(PackageScope p) { foreach (object obj2 in p.field_table) { JSGlobalField field = (JSGlobalField)obj2; ClassScope scope = field.value as ClassScope; if (base.name_table[field.Name] != null) { if (scope != null) { scope.owner.context.HandleError(JSError.DuplicateName, field.Name, true); scope.owner.name = scope.owner.name + p.GetHashCode().ToString(CultureInfo.InvariantCulture); } } else { base.field_table.Add(field); base.name_table[field.Name] = field; if (scope != null) { scope.owner.enclosingScope = this; scope.package = this; } } } }
internal void MergeWith(PackageScope p) { foreach (object obj2 in p.field_table) { JSGlobalField field = (JSGlobalField) obj2; ClassScope scope = field.value as ClassScope; if (base.name_table[field.Name] != null) { if (scope != null) { scope.owner.context.HandleError(JSError.DuplicateName, field.Name, true); scope.owner.name = scope.owner.name + p.GetHashCode().ToString(CultureInfo.InvariantCulture); } } else { base.field_table.Add(field); base.name_table[field.Name] = field; if (scope != null) { scope.owner.enclosingScope = this; scope.package = this; } } } }
internal void MergeWith(PackageScope p){ foreach (Object f in p.field_table){ JSGlobalField field = (JSGlobalField)f; ClassScope csc = field.value as ClassScope; if (this.name_table[field.Name] != null){ if (csc != null){ csc.owner.context.HandleError(JSError.DuplicateName, field.Name, true); csc.owner.name += p.GetHashCode().ToString(); } continue; } this.field_table.Add(field); this.name_table[field.Name] = field; if (csc != null){ csc.owner.enclosingScope = this; csc.package = this; } } }
internal void MergeWith(PackageScope p) { foreach (Object f in p.field_table) { JSGlobalField field = (JSGlobalField)f; ClassScope csc = field.value as ClassScope; if (this.name_table[field.Name] != null) { if (csc != null) { csc.owner.context.HandleError(JSError.DuplicateName, field.Name, true); csc.owner.name += p.GetHashCode().ToString(); } continue; } this.field_table.Add(field); this.name_table[field.Name] = field; if (csc != null) { csc.owner.enclosingScope = this; csc.package = this; } } }