Home | History | Annotate | Download | only in bug437.dir
      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 
      9 package main
     10 
     11 import (
     12 	"./one"
     13 	"./two"
     14 )
     15 
     16 func F(i1 one.I1) {
     17 	switch v := i1.(type) {
     18 	case two.S2:
     19 		one.F1(v)
     20 	}
     21 }
     22 
     23 func main() {
     24 	F(nil)
     25 }
     26