Bugzilla – Bug 317377
[GMCS] type lookup fails for constraints in partial classes
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by nazgul@omega.pl 2005-03-03 11:04:12 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: Probably some globalenv info is not correctly used when resolving constraints of partial classes' generic parameters Steps to reproduce the problem: 1. Try to compile this program: namespace A { interface IFoo { void Hello (IFoo foo); } } namespace B { partial class Test <T> : IDoo, A.IFoo where T : A.IFoo { } } namespace B { using A; partial class Test <T> : Y, IFoo where T : IFoo { void IFoo.Hello (IFoo foo) { } } } interface IDoo { } class Y { } class X { static void Main () { } } Actual Results: t.cs(21) error CS0246: Cannot find type 'IFoo' t.cs(12) error CS0265: Partial declarations of `B.Test`1' have inconsistent constraints for type parameter `T'. Expected Results: Compilation succeeded How often does this happen? Always Additional Information: compiles fine with csc 2.0Beta1 ---- Additional Comments From miguel@ximian.com 2005-03-15 19:07:02 MST ---- Maybe the new Hari framework from mcs could benefit gmcs here. ---- Additional Comments From martin@ximian.com 2005-04-22 13:59:08 MST ---- The merging FIXED that. Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Mandrake 10.1, mono svn from 2005.03.03</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".