xhd2015/xgo

Bug: internal compiler error: time.Duration is not assignable to int

xhd2015 opened this issue · 0 comments

          This fails to compile:
const (
	// The amount of time the nodecontroller should sleep between retrying node health updates
	retrySleepTime = 20 * time.Millisecond
)

func TestArrayPointer(t *testing.T) {
	a := retrySleepTime * ext.NodeHealthUpdateRetry
	_ = a
}

ext:

package ext

const (
	// NodeHealthUpdateRetry controls the number of retries of writing
	// node health update.
	NodeHealthUpdateRetry = 5
)

Test:

$ go run -tags dev ./cmd/xgo test --project-dir runtime/test/debug
# github.com/xhd2015/xgo/runtime/test/debug [github.com/xhd2015/xgo/runtime/test/debug.test]
./debug_test.go:24:27: internal compiler error: time.Duration is not assignable to int

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
FAIL    github.com/xhd2015/xgo/runtime/test/debug [build failed]
exit status 1
exit status 1

Originally posted by @xhd2015 in #181 (comment)