Skip to content

AG interface not correctly referencing another AG interface #87

Description

@OhRickCode

Firstly, thank you for all the hard work you put in to this library. It is much appreciated.

So...this is how to reproduce the issue:

Create a new C#8 class library.

Put this class in the root:

using AutomaticInterface;
using Test.Tests;
namespace Test;

[GenerateAutomaticInterface]
public class Test1 : ITest1
{
    public void Get(ITest2 test)
    {
    }
}

and this class in a Tests folder.

using AutomaticInterface;
namespace Test.Tests;

[GenerateAutomaticInterface]
public class Test2: ITest2
{
}

This will not build and shows the following errors:

The type or namespace name 'ITest2' could not be found (are you missing a using directive or an assembly reference?)

'Test1' does not implement interface member 'ITest1.Get(ITest2)'

Luckily, I found a workaround. If you change Test1's contructor parameter declaration from (ITest2 test) to (Tests.ITest2 test) then it will compile.

If there's any further information I can provide, just ask. 👍

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions