FastScriptReload icon indicating copy to clipboard operation
FastScriptReload copied to clipboard

Rewrites for same class token

Open builder-main opened this issue 4 weeks ago • 2 comments

This is the usecase I'd like to make workable. I open this as a reference and will try to make a PR sooner or later.

public class MyClass{

     private void MyMethod(){
       var myOtherInstanceOfMyClass = RetrieveOtherInstance<MyClass>();
       myOtherInstanceOfMyClass.MyOtherMethod();

       myOtherInstanceOfMyClass = RetrieveOtherInstance(typeof(MyClass));
       myOtherInstanceOfMyClass.MyOtherMethod();

      MyClass myOtherAgain= new MyClass();
      myOtherAgain.MyOtherMethod();
    }
    
     private void MyOtherMethod(){};

}

It seems doable as we simply need to rewrite <MyClass> and Typeof(myclass) and class naming, which is not rewritten when in the same class as of now.

builder-main avatar Oct 27 '25 12:10 builder-main