diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2004-09-07 12:23:19 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2004-09-07 12:23:19 +0400 |
commit | b3d9753954a6d9ddcc936b2b6ba06904f016ea13 (patch) | |
tree | 2472e1c59655bb8cbc93e8f759bba10af11cedf4 /mcs | |
parent | e8a49299fd275fbc4993a48939fa7763ed514bcf (diff) |
Fix test-290.cs.
* cs-parser.jay (delegate_declaration): Record a delegate
declaration as a type declaration.
Reported by Jo Vermeulen <jo@lumumba.luc.ac.be>.
svn path=/trunk/mcs/; revision=33480
Diffstat (limited to 'mcs')
-rwxr-xr-x | mcs/mcs/cs-parser.jay | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay index 428f3efbaff..9d601b0c6b1 100755 --- a/mcs/mcs/cs-parser.jay +++ b/mcs/mcs/cs-parser.jay @@ -1955,11 +1955,12 @@ delegate_declaration SEMICOLON { Location l = lexer.Location; + string name = MakeName ((string) $5); Delegate del = new Delegate (current_namespace, current_container, (Expression) $4, - (int) $2, MakeName ((string) $5), (Parameters) $7, - (Attributes) $1, l); - + (int) $2, name, (Parameters) $7, (Attributes) $1, l); + current_container.AddDelegate (del); + RootContext.Tree.RecordDecl (name, del); } | opt_attributes opt_modifiers @@ -1970,12 +1971,14 @@ delegate_declaration SEMICOLON { Location l = lexer.Location; + string name = MakeName ((string) $5); Delegate del = new Delegate ( current_namespace, current_container, - TypeManager.system_void_expr, (int) $2, MakeName ((string) $5), + TypeManager.system_void_expr, (int) $2, name, (Parameters) $7, (Attributes) $1, l); current_container.AddDelegate (del); + RootContext.Tree.RecordDecl (name, del); } ; |