保存的方法值会输出什么?

来自 方法
Go 1.27 进阶 2分钟

保存的方法值会输出什么?

Go
package main

import "fmt"

type Price struct{ Cents int }

func (price Price) WithTax(tax int) int {
    return price.Cents + tax
}

func main() {
    price := Price{Cents: 100}
    calculate := price.WithTax
    price.Cents = 200
    fmt.Println(calculate(20))
}
在试验场中打开
报告错误