1[short] skip 2[!cgo] skip 3 4# Test that cgo rejects attempts to declare methods 5# on the types A or *A; see issue #60725. 6 7! go build ./a 8stderr 'cannot define new methods on non-local type A' 9stderr 'cannot define new methods on non-local type A' 10 11-- go.mod -- 12module example.com 13go 1.24 14 15-- a/a.go -- 16package a 17 18/* 19typedef int T; 20*/ 21import "C" 22 23type A = C.T 24 25func (A) m1() {} 26func (*A) m2() {}