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
5package main
6
7import "./a"
8import "strings"
9
10func 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