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
package main
import "syscall/js"
type Wrapper interface {
JSValue() js.Value
}
type x struct {
js.Value
}
// first check
func newX() Wrapper {
return &x {}
}
func main() {
// second check
var _ Wrapper = newX()
}
and compiled with
export GOARCH=wasm GOOS=js
go build -o abc.wasm abc.go
What did you expect to see?
with go 1.11.2 i have
./abc.go:13:9: cannot use x literal (type *x) as type Wrapper in return argument:
*x does not implement Wrapper (missing JSValue method)
What did you see instead?
go version devel +b44cd15464
i dont have any error
Compiled successfully
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No only master
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
write simple test program
and compiled with
export GOARCH=wasm GOOS=js
go build -o abc.wasm abc.go
What did you expect to see?
with go 1.11.2 i have
./abc.go:13:9: cannot use x literal (type *x) as type Wrapper in return argument:
*x does not implement Wrapper (missing JSValue method)
What did you see instead?
go version devel +b44cd15464
i dont have any error
Compiled successfully
The text was updated successfully, but these errors were encountered: