Skip to content

Multiple usings of a generic interface on grain interface breaks code generation #8386

Open
@erikljung

Description

@erikljung

Orleans version: 7.1

The following code gives code generation error:

public interface IIndexable<T>
{
    Task<T> Do();
}
[GenerateSerializer]
public record Foo;

[GenerateSerializer]
public record Bar;

public interface ISomeGrain : IGrainWithGuidKey, IIndexable<Foo>, IIndexable<Bar>
{
}
public class SomeGrain : ISomeGrain
{
    Task<Foo> IIndexable<Foo>.Do() => throw new NotImplementedException();
    Task<Bar> IIndexable<Bar>.Do() => throw new NotImplementedException();
}

Error CS0738
'Proxy_ISomeGrain' does not implement interface member 'IIndexable.Do()'. 'Proxy_ISomeGrain.Do()' cannot implement 'IIndexable.Do()' because it does not have the matching return type of 'Task'. Domain.Grains.Models ..\Domain.Grains.Models\Orleans.CodeGenerator\Orleans.CodeGenerator.OrleansSerializationSourceGenerator\Panagora.E3.Domain.Grains.Models.orleans.g.cs 35 Active

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions