You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling a method on a returned value, the error message is incorrect.
Reproduction
type A: struct {
}
func NewA() => A {
return A{}
}
func A.f() {
}
func main {
NewA().f()
}
The current error is:
f is not in method set of A
However, in Go, we would expect the following error:
cannot call pointer method on NewA()
cannot take the address of NewA()
Expected behavior
The error message should be similar to Go’s message, indicating that methods on a pointer receiver cannot be called directly on a returned value. But the current error message could lead to confusion.
Environment
wa-lang version: v0.19.0
The text was updated successfully, but these errors were encountered:
Description
When calling a method on a returned value, the error message is incorrect.
Reproduction
The current error is:
However, in Go, we would expect the following error:
Expected behavior
The error message should be similar to Go’s message, indicating that methods on a pointer receiver cannot be called directly on a returned value. But the current error message could lead to confusion.
Environment
wa-lang version: v0.19.0
The text was updated successfully, but these errors were encountered: