golang.org/x/tools/gopls@v0.15.3/internal/test/marker/testdata/diagnostics/issue56943.txt (about) 1 This test verifies that we produce diagnostics related to mismatching 2 unexported interface methods in non-workspace packages. 3 4 Previously, we would fail to produce a diagnostic because we trimmed the AST. 5 See golang/go#56943. 6 -- main.go -- 7 package main 8 9 import ( 10 "go/ast" 11 "go/token" 12 ) 13 14 func main() { 15 var a int //@diag(re"(a) int", re"a.*declared.*not used") 16 var _ ast.Expr = node{} //@diag("node{}", re"missing.*exprNode") 17 } 18 19 type node struct{} 20 21 func (node) Pos() token.Pos { return 0 } 22 func (node) End() token.Pos { return 0 }