]> Cypherpunks repositories - gostls13.git/commitdiff
go/types: add missing test case for https://golang.org/cl/116735
authorRobert Griesemer <gri@golang.org>
Wed, 6 Jun 2018 19:35:09 +0000 (12:35 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 6 Jun 2018 19:46:38 +0000 (19:46 +0000)
Missed this in the prior submit.

For #24182.

Change-Id: If8349d39c80b7ff57bc0c857985f9e52241321b8
Reviewed-on: https://go-review.googlesource.com/116775
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/types/testdata/errors.src

index 29fcd8fe1da6de58a5e83c19a2c00926f8e1ecd0..ff929217c4c865ae18f8b918ee720762f15cf3cc 100644 (file)
@@ -53,3 +53,8 @@ func _() {
 // Use unqualified names for package-local objects.
 type T struct{}
 var _ int = T /* ERROR value of type T */ {} // use T in error message rather then errors.T
+
+// Don't report errors containing "invalid type" (issue #24182).
+func _(x *missing /* ERROR undeclared name: missing */ ) {
+       x.m() // there shouldn't be an error here referring to *invalid type
+}