LEFT | RIGHT |
(Both sides are equal) |
1 // Copyright 2012 The Go Authors. All rights reserved. | 1 // Copyright 2012 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // Tests that method calls through an interface always | 5 // Tests that method calls through an interface always |
6 // call the locally defined method localT.m independent | 6 // call the locally defined method localT.m independent |
7 // at which embedding level it is and in which order | 7 // at which embedding level it is and in which order |
8 // embedding is done. | 8 // embedding is done. |
9 | 9 |
10 package main | 10 package main |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 localT | 88 localT |
89 } | 89 } |
90 if t5.m() != "main.localT.m" { | 90 if t5.m() != "main.localT.m" { |
91 println("BUG: t5:", t5.m(), "called") | 91 println("BUG: t5:", t5.m(), "called") |
92 } | 92 } |
93 i = &t5 | 93 i = &t5 |
94 if i.m() != "main.localT.m" { | 94 if i.m() != "main.localT.m" { |
95 println("BUG: myT5:", i.m(), "called") | 95 println("BUG: myT5:", i.m(), "called") |
96 } | 96 } |
97 } | 97 } |
LEFT | RIGHT |