Bugzilla – Bug 322011
[GMCS] No access to internal members with generic classes
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by karl@waclawek.net 2006-09-06 14:46:17 MST ---- 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. ---- Additional Comments From karl@waclawek.net 2007-02-14 12:40:07 MST ---- This problem still exists in Mono 1.2.3. One of several problems preventing me from building (and running) Berkeley DB for .NET on Mono. ---- Additional Comments From martin@ximian.com 2007-03-14 16:22:32 MST ---- Note for myself: Fixed on rohan in the asgard tree. Will commit tomorrow morning. ---- Additional Comments From martin@ximian.com 2007-03-15 09:34:51 MST ---- Fixed in SVN; added gtest-314. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Fedora Core 4</cf_op_sys_details>