winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

renaming interface method doesn't rename the implemented class method #6693

Open tsuf239 opened 2 weeks ago

tsuf239 commented 2 weeks ago

I tried this:

A bug opened during the work on https://github.com/winglang/wing/pull/6637

  interface ICat {
      inflight stepOnKeyboard(): str;
                     //^
    }

    class Cat impl ICat {
      pub inflight stepOnKeyboard(): str {

         return "/..,.o0e";
      }
    }

    let hershy = new Cat();

    test "cat misbehaves" {
      hershy.stepOnKeyboard();
    }

This happened:

Nothing (since not implemented yet)

I expected this:

renaming ICat.stepOnKeyboard should trigger a rename Cat.stepOnKeyboard and hershy.stepOnKeyboard as well (and vice versa)

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes