mirror of
https://github.com/golang/go
synced 2024-11-17 08:54:41 -07:00
go/types, types2: replace some Errorf calls with Error calls (cleanup)
Change-Id: I9b6759a82b8009b323132c78cb7d78c2c35652bd Reviewed-on: https://go-review.googlesource.com/c/go/+/451815 Reviewed-by: Robert Griesemer <gri@google.com> Reviewed-by: Robert Findley <rfindley@google.com> Auto-Submit: Robert Griesemer <gri@google.com> Run-TryBot: Robert Griesemer <gri@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
a8f9d3f0af
commit
7f75b72904
@ -593,24 +593,24 @@ func TestIssue50646(t *testing.T) {
|
||||
comparableType := Universe.Lookup("comparable").Type()
|
||||
|
||||
if !Comparable(anyType) {
|
||||
t.Errorf("any is not a comparable type")
|
||||
t.Error("any is not a comparable type")
|
||||
}
|
||||
if !Comparable(comparableType) {
|
||||
t.Errorf("comparable is not a comparable type")
|
||||
t.Error("comparable is not a comparable type")
|
||||
}
|
||||
|
||||
if Implements(anyType, comparableType.Underlying().(*Interface)) {
|
||||
t.Errorf("any implements comparable")
|
||||
t.Error("any implements comparable")
|
||||
}
|
||||
if !Implements(comparableType, anyType.(*Interface)) {
|
||||
t.Errorf("comparable does not implement any")
|
||||
t.Error("comparable does not implement any")
|
||||
}
|
||||
|
||||
if AssignableTo(anyType, comparableType) {
|
||||
t.Errorf("any assignable to comparable")
|
||||
t.Error("any assignable to comparable")
|
||||
}
|
||||
if !AssignableTo(comparableType, anyType) {
|
||||
t.Errorf("comparable not assignable to any")
|
||||
t.Error("comparable not assignable to any")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -619,24 +619,24 @@ func TestIssue50646(t *testing.T) {
|
||||
comparableType := Universe.Lookup("comparable").Type()
|
||||
|
||||
if !Comparable(anyType) {
|
||||
t.Errorf("any is not a comparable type")
|
||||
t.Error("any is not a comparable type")
|
||||
}
|
||||
if !Comparable(comparableType) {
|
||||
t.Errorf("comparable is not a comparable type")
|
||||
t.Error("comparable is not a comparable type")
|
||||
}
|
||||
|
||||
if Implements(anyType, comparableType.Underlying().(*Interface)) {
|
||||
t.Errorf("any implements comparable")
|
||||
t.Error("any implements comparable")
|
||||
}
|
||||
if !Implements(comparableType, anyType.(*Interface)) {
|
||||
t.Errorf("comparable does not implement any")
|
||||
t.Error("comparable does not implement any")
|
||||
}
|
||||
|
||||
if AssignableTo(anyType, comparableType) {
|
||||
t.Errorf("any assignable to comparable")
|
||||
t.Error("any assignable to comparable")
|
||||
}
|
||||
if !AssignableTo(comparableType, anyType) {
|
||||
t.Errorf("comparable not assignable to any")
|
||||
t.Error("comparable not assignable to any")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user