- $$ = new InterfaceMethod (
- TypeManager.system_void_expr, (string) $4, (bool) $2, (Parameters) $6,
- (Attributes) $1, lexer.Location);
+ lexer.ConstraintsParsing = false;
+
+ MemberName name = (MemberName) $4;
+
+ if ($9 != null && name.TypeArguments == null)
+ Report.Error (80, lexer.Location,
+ "Contraints are not allowed on non-generic declarations");
+
+ GenericMethod generic = null;
+ if (name.TypeArguments != null) {
+ generic = new GenericMethod (current_namespace, current_container,
+ name, lexer.Location);
+
+ CheckDef (generic.SetParameterInfo ((ArrayList) $9), name.Name, lexer.Location);
+
+ $$ = new Method (generic, TypeManager.system_void_expr, (int) $2,
+ true, name, (Parameters) $6, (Attributes) $1,
+ lexer.Location);
+ } else
+ $$ = new Method (current_container, TypeManager.system_void_expr,
+ (int) $2, true, name, (Parameters) $6,
+ (Attributes) $1, lexer.Location);