[Mono-bugs] [Bug 79302][Nor] New - No access to internal members with generic classes

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 6 14:46:18 EDT 2006


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 karl at waclawek.net.

http://bugzilla.ximian.com/show_bug.cgi?id=79302

--- shadow/79302	2006-09-06 14:46:18.000000000 -0400
+++ shadow/79302.tmp.24677	2006-09-06 14:46:18.000000000 -0400
@@ -0,0 +1,71 @@
+Bug#: 79302
+Product: Mono: Compilers
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Fedora Core 4
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: karl at waclawek.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: No access to internal members with generic classes
+
+Description of Problem:
+Under certain scenarios with generic classes, "internal" member access
+from the same assembly causes a compile error in gmcs 1.1.17.1. This does
+not happen with MS C# 2.0.
+
+
+Steps to reproduce the problem - this file compiles in MS C# 2.0:
+
+<file>
+using System;
+
+namespace test
+{
+
+  public class App
+  {
+    public static void Main() {
+    
+    }
+  }
+
+  public class ThisClass<T, O>
+    where T: ThisClass<T, O>
+    where O: OtherClass<O, T>
+  {
+    internal int dummy;
+  }
+
+  public class OtherClass<O, T>
+    where O: OtherClass<O, T> 
+    where T: ThisClass<T, O>
+  {
+    public void Test(T tc) {
+      tc.dummy = 0;
+    }
+  }
+}
+</file>
+
+
+Actual Results: 
+test.cs(25,7): error CS0122: `test.ThisClass<T,O>.dummy' is inaccessible
+due to its protection level
+test.cs(17,18):: `test.ThisClass<T,O>.dummy', name of symbol related to
+previous error
+
+
+Expected Results:
+No error.
+
+
+How often does this happen? 
+Always.


More information about the mono-bugs mailing list