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

Implementing an interface method with a comment causes compiler error #6680

Open skyrpex opened 2 weeks ago

skyrpex commented 2 weeks ago

I tried this:

bring sim;

inflight class Resource impl sim.IResource {
  new() {}
  pub onStop() {
    //
  }
}

This happened:

Failed to compile.

error: Expected '}'
  --> wing/main.w:8:1
  |
8 | }
  | ^

I expected this:

I expected it to compile successfully, like this code:

bring sim;

inflight class Resource impl sim.IResource {
  new() {}
  pub onStop() {

  }
}

Is there a workaround?

Remove the comment.

Anything else?

No response

Wing Version

0.74.49

Node.js Version

No response

Platform(s)

No response

Community Notes