Left: | ||
Right: |
OLD | NEW |
---|---|
1 // $G $D/$F.dir/one.go && $G $D/$F.dir/two.go && $G $D/$F.go && $L $F.$A && ./$A .out | 1 // rundir |
2 | 2 |
3 // NOTE: This test is not run by 'run.go' and so not run by all.bash. | |
4 // To run this test you must use the ./run shell script. | |
5 | |
6 // Copyright 2012 The Go Authors. All rights reserved. | 3 // Copyright 2012 The Go Authors. All rights reserved. |
7 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
8 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
9 | 6 |
10 // Test converting a type defined in a different package to an | 7 // Test converting a type defined in a different package to an |
11 // interface defined in a third package, where the interface has a | 8 // interface defined in a third package, where the interface has a |
12 // hidden method. This used to cause a link error with gccgo. | 9 // hidden method. This used to cause a link error with gccgo. |
13 | 10 |
14 package main | 11 package ignored |
DMorsing
2012/10/10 19:39:44
Where did this body go?
remyoudompheng
2012/10/10 19:49:11
to bug437.dir/x.go
| |
15 | |
16 import ( | |
17 » "./one" | |
18 » "./two" | |
19 ) | |
20 | |
21 func F(i1 one.I1) { | |
22 » switch v := i1.(type) { | |
23 » case two.S2: | |
24 » » one.F1(v) | |
25 » } | |
26 } | |
27 | |
28 func main() { | |
29 » F(nil) | |
30 } | |
OLD | NEW |