<p dir="auto">by <strong><a href="mailto:sven@engelhardt.to">sven@engelhardt.to</a></strong>:</p>
<pre class="notranslate">What steps will reproduce the problem?
0. upgrade your go to weekly.2011-06-02
1. compile and install somebug.go
2. try to use it
3. look puzzled trying to understand what the error message is trying to say

What is the expected output?

the test should compile or somebug.go should not compile and install in the first place

What do you see instead?
$ gotest
rm -f _test/somebug.a
6g  -o _gotest_.6 somebug.go somebug_test.go
rm -f _test/somebug.a
gopack grc _test/somebug.a _gotest_.6 
_testmain.go:3: syntax error: unexpected ., expecting )
gotest: "/opt/go/bin/6g -I _test _testmain.go" failed: exit status 1

Which compiler are you using (5g, 6g, 8g, gccgo)?
tested with 6g/8g

Which operating system are you using?
Ubuntu Linux

Which revision are you using?  (hg identify)
3418f22c39eb weekly/weekly.2011-06-02

Please provide any additional information below.

Redefining the interface in any of these ways makes the problem go away:

weird(in IType) (_ IType)
weird(in IType) (IType, ok bool)
weird(in IType) (unused IType, ok bool)</pre>
<p dir="auto">Attachments:</p>
<ol dir="auto">
<li><a href="https://storage.googleapis.com/go-attachment/1915/0/somebug.go" rel="nofollow">somebug.go</a> (90 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/1915/0/somebug_test.go" rel="nofollow">somebug_test.go</a> (73 bytes)</li>
<li><a href="https://storage.googleapis.com/go-attachment/1915/0/Makefile" rel="nofollow">Makefile</a> (95 bytes)</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat $GOPATH/src/p/p.go
package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.R }"><pre class="notranslate"><code class="notranslate">$ cat $GOPATH/src/p/p.go
package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.R }
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ cat template.go
package p

import &quot;p&quot;

func before(t p.T) int { return t.R }
func after(t p.T) int  { return t.S.R }"><pre class="notranslate"><code class="notranslate">$ cat template.go
package p

import "p"

func before(t p.T) int { return t.R }
func after(t p.T) int  { return t.S.R }
</code></pre></div>
<p dir="auto">Run with <code class="notranslate">eg -t template.go junk</code> produces:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.S.S.R }"><pre class="notranslate"><code class="notranslate">package p

type S struct{ R int }

type T struct{ *S }

func F(t T) int { return t.S.S.R }
</code></pre></div>
<p dir="auto">One too many .S.</p>