<pre class="notranslate">See also <a href="https://golang.org/issue/8561" rel="nofollow">issue #8561</a>.

<a href="http://play.golang.org/p/VYrNcjJ_Qo" rel="nofollow">http://play.golang.org/p/VYrNcjJ_Qo</a>

compiles w/o a problem but leads to a guaranteed run-time failure: The method m in T1
and T2 have conflicting signatures and thus x (static type T1) cannot possibly be of
type T2.

The spec does not require that the signatures be conflict-free (
<a href="http://tip.golang.org/ref/spec#Type_assertions" rel="nofollow">http://tip.golang.org/ref/spec#Type_assertions</a> ):

"If T is an interface type, x.(T) asserts that the dynamic type of x implements the
interface T."

Interestingly, when it comes to interface assignments ("implements" relation),
conflicting method signatures are not permitted:

<a href="http://play.golang.org/p/QAZWsPqejr" rel="nofollow">http://play.golang.org/p/QAZWsPqejr</a>

prog.go:13: cannot use x2 (type T2) as type T1 in assignment:
    T2 does not implement T1 (wrong type for m method)
        have m(string)
        want m(int)
prog.go:14: cannot use x1 (type T1) as type T2 in assignment:
    T1 does not implement T2 (wrong type for m method)
        have m(int)
        want m(string)</pre>
<pre class="notranslate">Reported by developer on IRC

lucky(~/src) % gdb ./addr 
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;<a href="http://gnu.org/licenses/gpl.html&gt;" rel="nofollow">http://gnu.org/licenses/gpl.html&gt;</a>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
&lt;<a href="http://www.gnu.org/software/gdb/bugs/&gt;" rel="nofollow">http://www.gnu.org/software/gdb/bugs/&gt;</a>;...
Reading symbols from /home/dfc/src/addr...done.
(gdb) b main.main
Breakpoint 1 at 0x400c00: file /home/dfc/src/addr.go, line 9.
(gdb) r
Starting program: /home/dfc/src/addr 
[New LWP 3980]
[Switching to LWP 3980]

Breakpoint 1, main.main () at /home/dfc/src/addr.go:9
9       func main() {
(gdb) goroutines
Undefined command: "goroutines".  Try "help".

What is the expected output? What do you see instead?

gdb integration should work

Please use labels and text to provide additional information.</pre>