summaryrefslogtreecommitdiff
path: root/test/cmp6.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/cmp6.go')
-rw-r--r--test/cmp6.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/cmp6.go b/test/cmp6.go
index 981a85953..4c0601187 100644
--- a/test/cmp6.go
+++ b/test/cmp6.go
@@ -11,6 +11,10 @@ func use(bool) {}
type T1 *int
type T2 *int
+type T3 struct {}
+
+var t3 T3
+
func main() {
// Arguments to comparison must be
// assignable one to the other (or vice versa)
@@ -39,4 +43,7 @@ func main() {
use(p2 == p2)
use(p3 == p1)
use(p3 == p2)
+
+ // Comparison of structs should have a good message
+ use(t3 == t3) // ERROR "struct"
}