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# ()
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:

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.

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.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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