1// Copyright 2019 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 ssa
6
7type T struct{}
8
9func (T) foo() {}
10
11type fooer interface {
12	foo()
13}
14
15func Works(v interface{}) {
16	switch v.(type) {
17	case interface{}:
18		v.(fooer).foo()
19	}
20}
21
22func Panics(v interface{}) {
23	switch v.(type) {
24	case interface{}:
25		v.(fooer).foo()
26		v.(interface{ foo() }).foo()
27	}
28}
29