Skip to content

Static Members in an Interface Cause Shim Issues #276

@JasonBock

Description

@JasonBock

Describe the bug
Static members in interfaces (not abstract) confuses Rocks. I think it thinks it needs to include the members, and they need shims because they have implementations, but they shouldn't be included at all.

To Reproduce

var code =
  """
  using Rocks;

  public interface IRequest
  {
    public static string ToString(IRequest request) => "";
    public static string ToMethodCallString(IRequest request) => "";
    void AddInvokeMethodOptions(int options);
  }

  public static class Test
  {
    public static void Go() => Rock.Create<IRequest>();
  }
  """;

Expected behavior
No errors, and AddInvokeMethodOptions() is available to mock.

Additional context
This was found on Orleans.Runtime.IAsyncEnumerableRequest<>

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions