Skip to content

Wrong circular base type dependency errors on nested type inheritance #58424

@Blackclaws

Description

@Blackclaws

Version Used: Dotnet 6.0.100

Steps to Reproduce:

  1. Create a file with this content:
    public class Test : Test.IInner.IOuter {
    
        public interface IInner : Other {

            public interface IOuter
            {
                
            }
        }
    }

    public interface Other
    {
        
    }
  1. Try to compile it

Expected Behavior:
Compiles without error

Actual Behavior:
CS0146 Circular base type dependency.

Further Info
This seems conditional on the first inner interface inheriting from something else. This happens neither if the double nested interface inherits nor if there is no inheritance.

If the outer type implements just the nested interface that inherits everything is fine as well.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions