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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.


Create a new report for Bug 42198 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments


Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: