1// errorcheck -goexperiment fieldtrack
2
3// Copyright 2023 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
7package p
8
9func f(interface{ m() }) {}
10func g()                 { f(new(T)) } // ERROR "m method is marked 'nointerface'"
11
12type T struct{}
13
14//go:nointerface
15func (*T) m() {}
16