cmd/compile/internal/gc: introduce type for untyped constant kinds
Change-Id: Ia34b6dd099d07d5e1d4bffe775a20fa92705fdb0
Reviewed-on: https://go-review.googlesource.com/16335
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/compile/internal/gc/swt.go b/src/cmd/compile/internal/gc/swt.go
index 9ed30b2..3600e18 100644
--- a/src/cmd/compile/internal/gc/swt.go
+++ b/src/cmd/compile/internal/gc/swt.go
@@ -744,11 +744,11 @@
n2 := c2.node.Left
// sort by type (for switches on interface)
- ct := int(n1.Val().Ctype())
- if ct > int(n2.Val().Ctype()) {
+ ct := n1.Val().Ctype()
+ if ct > n2.Val().Ctype() {
return +1
}
- if ct < int(n2.Val().Ctype()) {
+ if ct < n2.Val().Ctype() {
return -1
}
if !Eqtype(n1.Type, n2.Type) {