Source file test/fixedbugs/issue42784.go

     1  // compile
     2  
     3  // Copyright 2020 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  // Ensure that late expansion correctly set OpLoad argument type interface{}
     8  
     9  package p
    10  
    11  type iface interface {
    12  	m()
    13  }
    14  
    15  type it interface{}
    16  
    17  type makeIface func() iface
    18  
    19  func f() {
    20  	var im makeIface
    21  	e := im().(it)
    22  	g(e)
    23  }
    24  
    25  //go:noinline
    26  func g(i it) {}
    27  

View as plain text