internal ParameterDeclaration(Context context, string identifier, TypeExpression type, CustomAttributeList customAttributes) { this.identifier = identifier; this.type = (type == null) ? new TypeExpression(new ConstantWrapper(Typeob.Object, context)) : type; this.context = context; ActivationObject obj2 = (ActivationObject)context.document.engine.Globals.ScopeStack.Peek(); if (obj2.name_table[this.identifier] != null) { context.HandleError(JSError.DuplicateName, this.identifier, ((obj2 is ClassScope) || obj2.fast) || (type != null)); } else { obj2.AddNewField(this.identifier, null, FieldAttributes.PrivateScope).originalContext = context; } this.customAttributes = customAttributes; }
internal ParameterDeclaration(Context context, String identifier, TypeExpression type, CustomAttributeList customAttributes) : base() { this.identifier = identifier; this.type = type == null ? new TypeExpression(new ConstantWrapper(Typeob.Object, context)) : type; this.context = context; ActivationObject current_scope = (ActivationObject)context.document.engine.Globals.ScopeStack.Peek(); if (current_scope.name_table[this.identifier] != null) { //Only happens if there is another parameter declarations with the same name context.HandleError(JSError.DuplicateName, this.identifier, current_scope is ClassScope || current_scope.fast || type != null); } else { JSVariableField field = current_scope.AddNewField(this.identifier, null, 0); field.originalContext = context; } this.customAttributes = customAttributes; }