Skip to content

Commit d6f569d

Browse files
committed
compiler: use goenv.Compare instead of WantGoVersion
1 parent 9480f47 commit d6f569d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/symbol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ func (c *compilerContext) isValidWasmType(typ types.Type, site wasmSite) bool {
468468
hasHostLayout := true // default to true before detecting Go version
469469
// (*types.Package).GoVersion added in go1.21
470470
if gv, ok := any(c.pkg).(interface{ GoVersion() string }); ok {
471-
if goenv.WantGoVersion(gv.GoVersion(), 1, 23) {
471+
if goenv.Compare(gv.GoVersion(), "go1.23") >= 0 {
472472
hasHostLayout = false // package structs added in go1.23
473473
}
474474
}

0 commit comments

Comments
 (0)