We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e14e67f commit 78fac02Copy full SHA for 78fac02
test/fixedbugs/issue15722.go
@@ -0,0 +1,21 @@
1
+// errorcheck
2
+
3
+// Copyright 2016 The Go Authors. All rights reserved.
4
+// Use of this source code is governed by a BSD-style
5
+// license that can be found in the LICENSE file.
6
7
+// Checks to make sure that the compiler can catch a specific invalid
8
+// method type expression. NB: gccgo and gc have slightly different
9
+// error messages, hence the generic test for 'method' and not something
10
+// more specific.
11
12
+package issue15722
13
14
+type T int
15
+type P *T
16
17
+func (T) t() {}
18
19
+func _(p P) {
20
+ P.t(p) // ERROR "method"
21
+}
0 commit comments