]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/typecheck: use constant.MakeUnknown()
authorqiulaidongfeng <2645477756@qq.com>
Sun, 10 Sep 2023 04:33:34 +0000 (04:33 +0000)
committerGopher Robot <gobot@golang.org>
Sun, 10 Sep 2023 23:21:34 +0000 (23:21 +0000)
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>

src/cmd/compile/internal/typecheck/const.go

index 2ac489aeefc2d28fa32e165ae1e75faa3b094600..9ad37033fd5e5f7adf873ba51672983b7a6bfe02 100644 (file)
@@ -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 {