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=79362 --- shadow/79362 2006-09-11 15:28:05.000000000 -0400 +++ shadow/79362.tmp.32487 2006-09-11 15:28:05.000000000 -0400 @@ -0,0 +1,54 @@ +Bug#: 79362 +Product: Mono: Compilers +Version: 1.1 +OS: +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Blocker +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: [GMCS] Cannot access protected members of base class from the constructor + +Compilation of the following code: + +class A<T> +{ + protected A () + { + } + + protected int Foo + { + get + { + return 47; + } + } +} + + +class B<T> : A<T> +{ + public B () : base () + { + System.Console.WriteLine (this.Foo); + } +} + + +Fails with: + +b.cs(21,31): error CS1540: Cannot access protected member `A<T>.Foo' via a +qualifier of type `B<T>'; the qualifier must be of type `B<T>' (or derived +from it) + +The error message is obviously non-sense. Similar non-generic code is +compilable. Also, changing 'protected int Foo' to 'public int Foo' helps to +compile the code. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
