1// compile 2 3// Copyright 2022 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 9import ( 10 "sync/atomic" 11) 12 13type I interface { 14 M() 15} 16 17type S struct{} 18 19func (*S) M() {} 20 21type T struct { 22 I 23 x atomic.Int64 24} 25 26func F() { 27 t := &T{I: &S{}} 28 t.M() 29} 30