(val ref.Val, suffix string)
| 962 | } |
| 963 | |
| 964 | func maybeSuffixError(val ref.Val, suffix string) ref.Val { |
| 965 | if types.IsError(val) { |
| 966 | msg := val.(*types.Err).String() |
| 967 | if !strings.Contains(msg, suffix) { |
| 968 | return types.NewErr("%s: %s", msg, suffix) |
| 969 | } |
| 970 | } |
| 971 | return val |
| 972 | } |
| 973 | |
| 974 | func estimateMathListCost(estimator checker.CostEstimator, target *checker.AstNode, args []checker.AstNode) *checker.CallEstimate { |
| 975 | if len(args) != 1 { |