Skip to content

Commit f0e738d

Browse files
committed
compiler: use goenv.Compare instead of WantGoVersion
1 parent 08bda1a commit f0e738d

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
@@ -474,7 +474,7 @@ func (c *compilerContext) isValidWasmType(typ types.Type, site wasmSite) bool {
474474
hasHostLayout := true // default to true before detecting Go version
475475
// (*types.Package).GoVersion added in go1.21
476476
if gv, ok := any(c.pkg).(interface{ GoVersion() string }); ok {
477-
if goenv.WantGoVersion(gv.GoVersion(), 1, 23) {
477+
if goenv.Compare(gv.GoVersion(), "go1.23") >= 0 {
478478
hasHostLayout = false // package structs added in go1.23
479479
}
480480
}

0 commit comments

Comments
 (0)