Skip to content

Try to fix rewrite for self file extension method [Workaround] #117

Open
@builder-main

Description

@builder-main

Hi, let's try to make a rewriter for extension methods. It would allow to avoid ambiguous call compilation errors :

public static class SomeClass {

  public static void MyExtension(this string myString){  ... }

  public static void MyMethod(){  "someValue".MyExtension() } //Will cause an ambiguous call in the compiler

  public static void MyMethod(){  MyExtension("someValue") } //This works and is the current workaround.
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions