Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79589 --- shadow/79589 2006-10-05 17:39:16.000000000 -0400 +++ shadow/79589.tmp.16398 2006-10-05 17:39:16.000000000 -0400 @@ -0,0 +1,49 @@ +Bug#: 79589 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: OS X 10.4.8 +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Cannot use constructor parameter when creating a new delegate parameter for overloaded constructor (!) + +Steps to reproduce the problem: +Try to compile: + +public class ClassOne +{ + public delegate string ReturnStringDelegate(); + + public ClassOne(ReturnStringDelegate d) + { + // do stuff here... + } + + public ClassOne(string s) + : this(new ReturnStringDelegate(delegate() { return s; })) + { + } +} + +Actual Results: +Compiler fails with the error: + + test.cs(11,57): error CS0103: The name `s' does not exist in the context +of `ClassOne' + +Expected Results: +Successful compilation with the behaviour being that the second constructor +calls the first constructor with a new ReturnStringDelegate which returns s +as the parameter. + +Additional Information: +Works with Visual Studio 2005 _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
