This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 42198 - error CS0529: Inherited interface causes a cycle in the interface hierarchy.
Summary: error CS0529: Inherited interface causes a cycle in the interface hierarchy.
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 4.4.0 (C7)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2016-06-28 08:16 UTC by jeffp1618
Modified: 2016-07-29 13:31 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description jeffp1618 2016-06-28 08:16:09 UTC
Compiling the following snippet of code using 'mcs' fails, where as it compiles using 'csc' (v1.2.0.60317) that comes with Visual Studio 2015.

namespace Example
{
    public class A : A.InnerInterface
    {
        public interface InnerInterface
        {
        }

        public static void Main(string[] args)
        {
        } 
    }
}

$ ../mono/bin/mcs --version
Mono C# compiler version 4.4.1.0

$ ../mono/bin/mcs Test.cs
Test.cs(4,18): error CS0146: Circular base class dependency involving `Example.A' and `Example.A.InnerInterface'
Test.cs(6,26): (Location of the symbol related to previous error)
Test.cs(6,26): error CS0529: Inherited interface `Example.A.InnerInterface' causes a cycle in the interface hierarchy of `Example.A.InnerInterface'
Test.cs(6,26): (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 0 warnings
Comment 1 Marek Safar 2016-07-29 13:31:27 UTC
Fixed in master and Mono 4.6

Note You need to log in before you can comment on or make changes to this bug.