diff options
| author | Russ Cox <rsc@golang.org> | 2011-04-07 18:53:47 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-04-07 18:53:47 -0400 |
| commit | 35c880b1e2c00752cd8961780e4c26ea5b287377 (patch) | |
| tree | 13f991cdf0dbeb25178fe0b8456c25a4890248c0 /src | |
| parent | 62c24811e73b45481f1abcf693606ea3e598b932 (diff) | |
| download | go-35c880b1e2c00752cd8961780e4c26ea5b287377.tar.xz | |
gc: bug327
Fixes #1674.
R=ken2
CC=golang-dev
https://golang.org/cl/4368057
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/gc/subr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index b4c58d10d7..eb0fc3c624 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -1889,8 +1889,9 @@ assignop(Type *src, Type *dst, char **why) return OCONVNOP; // 2. src and dst have identical underlying types - // and either src or dst is not a named type. - if(eqtype(src->orig, dst->orig) && (src->sym == S || dst->sym == S)) + // and either src or dst is not a named type or + // both are interface types. + if(eqtype(src->orig, dst->orig) && (src->sym == S || dst->sym == S || src->etype == TINTER)) return OCONVNOP; // 3. dst is an interface type and src implements dst. |
