1// Copyright 2012 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// Test converting a type defined in a different package to an
6// interface defined in a third package, where the interface has a
7// hidden method.  This used to cause a link error with gccgo.
8
9package main
10
11import (
12	"./one"
13	"./two"
14)
15
16func F(i1 one.I1) {
17	switch v := i1.(type) {
18	case two.S2:
19		one.F1(v)
20	}
21}
22
23func main() {
24	F(nil)
25}
26