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:
parent
8f19394b62
commit
e7aa0f9f28
@ -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…
Reference in New Issue
Block a user