Bug 317377 (MONO73287) - [GMCS] type lookup fails for constraints in partial classes
Summary: [GMCS] type lookup fails for constraints in partial classes
Status: RESOLVED FIXED
Alias: MONO73287
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.0
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Martin Baulig
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-03 18:04 UTC by Kamil Skalski
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:09:50 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".