Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Helloworld does not compiled #703

Closed
Closed
@fpawel

Description

@fpawel

Code from GopherJS Playground:

package main
import (
	"fmt"
	"github.com/gopherjs/gopherjs/js"
)
func main() {
	fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}
$ gopherjs build
C:\Go\src\internal\poll\fd_windows.go:367:22: invalid operation: fd.pd (variable of type pollDesc) has no field or method runtimeCtx
C:\Go\src\internal\poll\fd_windows.go:368:22: invalid operation: fd.pd (variable of type pollDesc) has no field or method runtimeCtx
C:\Go\src\internal\poll\fd_windows.go:157:5: invalid operation: o.fd.pd (variable of type pollDesc) has no field or method runtimeCtx
$ go version
go version go1.9 windows/amd64
$ gopherjs version
GopherJS 1.9-1

The code is compiled if comment out "fmt":

package main
import (
	//"fmt"
	"github.com/gopherjs/gopherjs/js"
)
func main() {
	//fmt.Println("Hello, playground")
	js.Global.Call("alert", "Hello, JavaScript")
	println("Hello, JS console")
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions