]> Cypherpunks repositories - gostls13.git/commit
gc: implement new comparison rule
authorRuss Cox <rsc@golang.org>
Mon, 13 Sep 2010 19:42:47 +0000 (15:42 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 13 Sep 2010 19:42:47 +0000 (15:42 -0400)
commit23bd214aeeb660f26642cc81153edfa87683a289
tree45c59deebd738324c04892b65eea3c8a86a71672
parentc3900387db5f44eeb97170fd613a0c263ff6185d
gc: implement new comparison rule

The new comparison rule was added to the spec by

changeset:   5605:33abb649cb63
user:        Robert Griesemer <gri@golang.org>
date:        Thu Jun 03 16:55:50 2010 -0700
files:       doc/go_spec.html
description:
go spec: Base comparison compatibility on assignment compatibility.

Specifically:
- Simplified definition of comparison compatibility and folded into
  section on comparison operators since it's only used there.

This is a small language change/cleanup. As a consequence:
- An interface value may now be compared against a non-interface value.
- Channels with opposite directions cannot be compared directly anymore
  (per discussion with rsc).

R=rsc, r, iant, ken2
CC=golang-dev
https://golang.org/cl/1462041

but never implemented.

Fixes #1070.

R=ken2
CC=golang-dev
https://golang.org/cl/2116047
src/cmd/gc/typecheck.c
test/cmp1.go
test/cmp6.go [new file with mode: 0644]