1
0
mirror of https://github.com/golang/go synced 2024-09-23 09:23:20 -06:00

test: recognize gofrontend error messages

shift1.go:76:16: error: shift of non-integer operand
shift1.go:77:16: error: shift of non-integer operand

Change-Id: I48584c0b01f9f6912a93b5f9bba55b5803fbeced
Reviewed-on: https://go-review.googlesource.com/c/go/+/273888
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
Ian Lance Taylor 2020-11-28 18:14:38 -08:00
parent d6abf298cf
commit a45e12fd4b

View File

@ -73,8 +73,8 @@ func _() {
// non constants arguments trigger a different path
f2 := 1.2
s2 := "hi"
_ = f2 << 2 // ERROR "shift of type float64"
_ = s2 << 2 // ERROR "shift of type string"
_ = f2 << 2 // ERROR "shift of type float64|non-integer"
_ = s2 << 2 // ERROR "shift of type string|non-integer"
}
// shifts in comparisons w/ untyped operands