[Mono-bugs] [Bug 73287][Wis] New - [GMCS] type lookup fails for constraints in partial classes
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 3 Mar 2005 11:04:13 -0500 (EST)
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 nazgul@omega.pl.
http://bugzilla.ximian.com/show_bug.cgi?id=73287
--- shadow/73287 2005-03-03 11:04:13.000000000 -0500
+++ shadow/73287.tmp.19903 2005-03-03 11:04:13.000000000 -0500
@@ -0,0 +1,78 @@
+Bug#: 73287
+Product: Mono: Compilers
+Version: 1.0
+OS:
+OS Details: Mandrake 10.1, mono svn from 2005.03.03
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: C#
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: nazgul@omega.pl
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: [GMCS] type lookup fails for constraints in partial classes
+
+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