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 handles an OpIData with type interface{} 8 9package p 10 11type S struct{} 12 13func (S) M() {} 14 15type I interface { 16 M() 17} 18 19func f(i I) { 20 o := i.(interface{}) 21 if _, ok := i.(*S); ok { 22 o = nil 23 } 24 println(o) 25} 26