aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorqiulaidongfeng <2645477756@qq.com>2023-09-10 04:33:34 +0000
committerGopher Robot <gobot@golang.org>2023-09-10 23:21:34 +0000
commit5eb382fc08fb32592e9585f9cb99005696a38b49 (patch)
treed6809ded5ebc77157481cbdb2faaa62850af0220 /src
parentee788dbae0fc8e074fc66fc76f0597200b443950 (diff)
downloadgo-5eb382fc08fb32592e9585f9cb99005696a38b49.tar.xz
cmd/compile/internal/typecheck: use constant.MakeUnknown()
Complete a TODO. Change-Id: I1bd23f0be725c9dd81b8316a7abba1bceecc346f Change-Id: I1bd23f0be725c9dd81b8316a7abba1bceecc346f GitHub-Last-Rev: 51523084a3675b91cdf49491bbaa9e78f78e3742 GitHub-Pull-Request: golang/go#62553 Reviewed-on: https://go-review.googlesource.com/c/go/+/527178 Reviewed-by: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/compile/internal/typecheck/const.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/typecheck/const.go b/src/cmd/compile/internal/typecheck/const.go
index 2ac489aeef..9ad37033fd 100644
--- a/src/cmd/compile/internal/typecheck/const.go
+++ b/src/cmd/compile/internal/typecheck/const.go
@@ -305,8 +305,7 @@ func toint(v constant.Value) constant.Value {
}
// Prevent follow-on errors.
- // TODO(mdempsky): Use constant.MakeUnknown() instead.
- return constant.MakeInt64(1)
+ return constant.MakeUnknown()
}
func tostr(v constant.Value) constant.Value {