mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00: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:
parent
8f19394b62
commit
e7aa0f9f28
2 changed files with 12 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
6
src/go/types/testdata/issues.src
vendored
6
src/go/types/testdata/issues.src
vendored
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue