Source file test/fixedbugs/issue18911.dir/b.go
1 // Copyright 2018 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 import "./a" 8 import "strings" 9 10 func main() { 11 defer func() { 12 p, ok := recover().(error) 13 if ok && strings.Contains(p.Error(), "different packages") { 14 return 15 } 16 panic(p) 17 }() 18 19 // expected to fail and report two identical looking (but different) types 20 _ = a.X.(struct{ x int }) 21 } 22