diff options
| author | Russ Cox <rsc@golang.org> | 2010-05-24 16:55:23 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-05-24 16:55:23 -0700 |
| commit | 1a9c46be99cf7d3c95a61bb78c83ebc92afc14a5 (patch) | |
| tree | d500e2f571ff1af803b536795e5dd899c2ce694c /src/cmd/gc/subr.c | |
| parent | 3574911597e5f2aec3e8efa653d361eb6d500fec (diff) | |
| download | golang-1a9c46be99cf7d3c95a61bb78c83ebc92afc14a5.tar.gz | |
gc: fix shift/reduce conflict in go.y export syntax
Fixes issue 771.
R=ken2
CC=golang-dev
http://codereview.appspot.com/1267042
Diffstat (limited to 'src/cmd/gc/subr.c')
| -rw-r--r-- | src/cmd/gc/subr.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c index b0192adf3..cf7b1865c 100644 --- a/src/cmd/gc/subr.c +++ b/src/cmd/gc/subr.c @@ -1295,8 +1295,12 @@ Tpretty(Fmt *fp, Type *t) fmtprint(fp, "... %T", t->type->type); } else fmtprint(fp, "%T", t->type); - if(t->note) - fmtprint(fp, " \"%Z\"", t->note); + if(t->note) { + fmtprint(fp, " "); + if(exporting) + fmtprint(fp, ":"); + fmtprint(fp, "\"%Z\"", t->note); + } return 0; case TFORW: |
