<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/go-git.git/test/method1.go, branch dev.typealias</title>
<subtitle>github.com: golang/go
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/'/>
<entry>
<title>cmd/compile: ignore receiver parameters in Eqtype</title>
<updated>2016-03-17T00:38:15+00:00</updated>
<author>
<name>Matthew Dempsky</name>
<email>mdempsky@google.com</email>
</author>
<published>2016-03-11T22:38:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=b2b5e779f51fa37cb241417887decf4be38240d6'/>
<id>b2b5e779f51fa37cb241417887decf4be38240d6</id>
<content type='text'>
Receiver parameters generally aren't relevant to the function
signature type. In particular:

  1. When checking whether a type's method implements an interface's
     method, we specifically want to ignore the receiver parameters,
     because they'll be different.

  2. When checking interface type equality, interface methods always
     use the same "fakethis" *struct{} type as their receiver.

  3. Finally, method expressions and method values degenerate into
     receiver-less function types.

The only case where we care about receiver types matching is in
addmethod, which is easily handled by adding an extra Eqtype check of
the receiver parameters. Also, added a test for this, since
(surprisingly) there weren't any.

As precedence, go/types.Identical ignores receiver parameters when
comparing go/types.Signature values.

Notably, this allows us to slightly simplify the "implements"
function, which is used for checking whether type/interface t
implements interface iface. Currently, cmd/compile actually works
around Eqtype's receiver parameter checking by creating new throwaway
TFUNC Types without the receiver parameter.

(Worse, the compiler currently only provides APIs to build TFUNC Types
from Nod syntax trees, so building those throwaway types also involves
first building throwaway syntax trees.)

Passes toolstash -cmp.

Change-Id: Ib07289c66feacee284e016bc312e8c5ff674714f
Reviewed-on: https://go-review.googlesource.com/20602
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Receiver parameters generally aren't relevant to the function
signature type. In particular:

  1. When checking whether a type's method implements an interface's
     method, we specifically want to ignore the receiver parameters,
     because they'll be different.

  2. When checking interface type equality, interface methods always
     use the same "fakethis" *struct{} type as their receiver.

  3. Finally, method expressions and method values degenerate into
     receiver-less function types.

The only case where we care about receiver types matching is in
addmethod, which is easily handled by adding an extra Eqtype check of
the receiver parameters. Also, added a test for this, since
(surprisingly) there weren't any.

As precedence, go/types.Identical ignores receiver parameters when
comparing go/types.Signature values.

Notably, this allows us to slightly simplify the "implements"
function, which is used for checking whether type/interface t
implements interface iface. Currently, cmd/compile actually works
around Eqtype's receiver parameter checking by creating new throwaway
TFUNC Types without the receiver parameter.

(Worse, the compiler currently only provides APIs to build TFUNC Types
from Nod syntax trees, so building those throwaway types also involves
first building throwaway syntax trees.)

Passes toolstash -cmp.

Change-Id: Ib07289c66feacee284e016bc312e8c5ff674714f
Reviewed-on: https://go-review.googlesource.com/20602
Reviewed-by: Robert Griesemer &lt;gri@golang.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test: commentary for [h-m]*.go</title>
<updated>2012-02-23T07:47:26+00:00</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2012-02-23T07:47:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=501f0b578fd2bbd1919d85c4d3d4bb2e15e18545'/>
<id>501f0b578fd2bbd1919d85c4d3d4bb2e15e18545</id>
<content type='text'>
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5674112
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/5674112
</pre>
</div>
</content>
</entry>
<entry>
<title>test: use testlib (final 61)</title>
<updated>2012-02-17T04:51:04+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2012-02-17T04:51:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=57eb06fe93db49501ab61340a1bf41b95a3474b3'/>
<id>57eb06fe93db49501ab61340a1bf41b95a3474b3</id>
<content type='text'>
X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go &amp;&amp; \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go &amp;&amp; \$L \$F\.\$A &amp;&amp; \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671080
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
X ,s;^// \$G (\$D/)?\$F\.go *$;// compile;g
X ,s;^// \$G (\$D/)?\$F\.go &amp;&amp; \$L \$F\.\$A *$;// build;g
X ,s;^// \$G (\$D/)?\$F\.go &amp;&amp; \$L \$F\.\$A &amp;&amp; \./\$A\.out *$;// run;g
X ,s;^// errchk \$G( -e)? (\$D/)?\$F\.go *$;// errorcheck;g

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5671080
</pre>
</div>
</content>
</entry>
<entry>
<title>test: s/float/float64/</title>
<updated>2011-01-21T16:37:58+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2011-01-21T16:37:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=68683a6a61d7647a7c1fde201fb8286c89f7a9a7'/>
<id>68683a6a61d7647a7c1fde201fb8286c89f7a9a7</id>
<content type='text'>
Otherwise gccgo gives an extra error message not matched by errchk.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4053042
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise gccgo gives an extra error message not matched by errchk.

R=adg, rsc
CC=golang-dev
https://golang.org/cl/4053042
</pre>
</div>
</content>
</entry>
<entry>
<title>test: remove semiocolons.</title>
<updated>2010-09-04T00:36:13+00:00</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2010-09-04T00:36:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=4f61fc96b2788be7cbfc6f7a72acef3d3feeeb6c'/>
<id>4f61fc96b2788be7cbfc6f7a72acef3d3feeeb6c</id>
<content type='text'>
The ken directory is untouched so we have some examples with explicit semis.

R=gri
CC=golang-dev
https://golang.org/cl/2157041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ken directory is untouched so we have some examples with explicit semis.

R=gri
CC=golang-dev
https://golang.org/cl/2157041
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable these tests.  Fix divconst.go and modconst.go to</title>
<updated>2009-08-21T22:43:23+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2009-08-21T22:43:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=8bbe748b84bce360a0636a62f80cde198adefa28'/>
<id>8bbe748b84bce360a0636a62f80cde198adefa28</id>
<content type='text'>
compile with the current compiler.  Adjust expected error
message in method1.go to match 6g output.

R=rsc
DELTA=9  (2 added, 5 deleted, 2 changed)
OCL=33674
CL=33682
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
compile with the current compiler.  Adjust expected error
message in method1.go to match 6g output.

R=rsc
DELTA=9  (2 added, 5 deleted, 2 changed)
OCL=33674
CL=33682
</pre>
</div>
</content>
</entry>
<entry>
<title>fix up some irregular indentation</title>
<updated>2009-08-17T20:30:22+00:00</updated>
<author>
<name>Rob Pike</name>
<email>r@golang.org</email>
</author>
<published>2009-08-17T20:30:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=74dd0ab670751feca69ca1aaf4db9859c5e52b41'/>
<id>74dd0ab670751feca69ca1aaf4db9859c5e52b41</id>
<content type='text'>
R=rsc
OCL=33382
CL=33391
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=rsc
OCL=33382
CL=33391
</pre>
</div>
</content>
</entry>
<entry>
<title>delete export</title>
<updated>2009-01-20T22:40:40+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2009-01-20T22:40:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=839a68469b6f8bf40620a7977041e089bbd0eba3'/>
<id>839a68469b6f8bf40620a7977041e089bbd0eba3</id>
<content type='text'>
TBR=r
OCL=23121
CL=23127
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TBR=r
OCL=23121
CL=23127
</pre>
</div>
</content>
</entry>
<entry>
<title>convert tests; nothing interesting.</title>
<updated>2009-01-17T00:12:14+00:00</updated>
<author>
<name>Russ Cox</name>
<email>rsc@golang.org</email>
</author>
<published>2009-01-17T00:12:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=f48cbfdf5629526ed49534e55298a5a12216ea0c'/>
<id>f48cbfdf5629526ed49534e55298a5a12216ea0c</id>
<content type='text'>
R=r
OCL=23012
CL=23014
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
R=r
OCL=23012
CL=23014
</pre>
</div>
</content>
</entry>
<entry>
<title>Recognize gccgo error messages.  This uses GCCGO_ERROR, which</title>
<updated>2008-11-12T02:18:34+00:00</updated>
<author>
<name>Ian Lance Taylor</name>
<email>iant@golang.org</email>
</author>
<published>2008-11-12T02:18:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/go-git.git/commit/?id=9c9cc2c9d8bd2303e1f0c3619c1451ac469fc086'/>
<id>9c9cc2c9d8bd2303e1f0c3619c1451ac469fc086</id>
<content type='text'>
is recognized by the gccgo testsuite but is ignored by the
errchk script used with 6g.

method1.go:7:1: error: redefinition of 'M': parameter types changed
method1.go:6:1: note: previous definition of 'M' was here
method1.go:10:1: error: redefinition of 'f': parameter types changed
method1.go:9:1: note: previous definition of 'f' was here
method1.go:13:1: error: redefinition of 'g': parameter names changed
method1.go:12:1: note: previous definition of 'g' was here

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=18962
CL=19058
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
is recognized by the gccgo testsuite but is ignored by the
errchk script used with 6g.

method1.go:7:1: error: redefinition of 'M': parameter types changed
method1.go:6:1: note: previous definition of 'M' was here
method1.go:10:1: error: redefinition of 'f': parameter types changed
method1.go:9:1: note: previous definition of 'f' was here
method1.go:13:1: error: redefinition of 'g': parameter names changed
method1.go:12:1: note: previous definition of 'g' was here

R=rsc
DELTA=5  (0 added, 0 deleted, 5 changed)
OCL=18962
CL=19058
</pre>
</div>
</content>
</entry>
</feed>
