Source file test/fixedbugs/issue47928.go

     1  // run -goexperiment fieldtrack
     2  
     3  // Copyright 2021 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  package main
     8  
     9  func main() {
    10  	var i interface{} = new(T)
    11  	if _, ok := i.(interface{ Bad() }); ok {
    12  		panic("FAIL")
    13  	}
    14  }
    15  
    16  type T struct{ U }
    17  
    18  type U struct{}
    19  
    20  //go:nointerface
    21  func (*U) Bad() {}
    22  

View as plain text