1
0
mirror of https://github.com/golang/go synced 2024-11-23 00:50:05 -07:00

go/types, types2: add a test case for shifts that used to fail

For #42989.

Change-Id: Ic354edde23ed7bfb4cb3eec2794f7213ed862b47
Reviewed-on: https://go-review.googlesource.com/c/go/+/303090
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
Robert Griesemer 2021-03-18 15:10:44 -07:00
parent 8f19394b62
commit e7aa0f9f28
2 changed files with 12 additions and 0 deletions

View File

@ -363,3 +363,9 @@ func issue35895() {
// qualify packages with full path name in this case.
var _ t1.Template = t2 /* ERROR cannot use .* \(value of type "html/template".Template\) as "text/template".Template */ .Template{}
}
func issue42989(s uint) {
var m map[int]string
delete(m, 1<<s)
delete(m, 1.<<s)
}

View File

@ -363,3 +363,9 @@ func issue35895() {
// qualify packages with full path name in this case.
var _ t1.Template = t2 /* ERROR cannot use .* \(value of type "html/template".Template\) as "text/template".Template */ .Template{}
}
func issue42989(s uint) {
var m map[int]string
delete(m, 1<<s)
delete(m, 1.<<s)
}