Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1984)

Issue 6500064: code review 6500064: cmd/gc: Suggest *T in error for x.(T) if it would work. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by DMorsing
Modified:
12 years, 6 months ago
Reviewers:
CC:
golang-dev, remyoudompheng, rsc
Visibility:
Public.

Description

cmd/gc: Suggest *T in error for x.(T) if it would work. Accomplished by synchronizing the formatting of conversion errors between typecheck.c and subr.c Fixes issue 3984.

Patch Set 1 #

Patch Set 2 : diff -r 0bd4ca4547b5 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 0bd4ca4547b5 https://code.google.com/p/go/ #

Total comments: 3

Patch Set 4 : diff -r 0bd4ca4547b5 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -7 lines) Patch
M src/cmd/gc/typecheck.c View 1 2 3 1 chunk +13 lines, -7 lines 0 comments Download
M test/interface/explicit.go View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 8
DMorsing
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, rsc@golang.org), I'd like you to review this change to https://code.google.com/p/go/
12 years, 6 months ago (2012-09-01 13:06:22 UTC) #1
remyoudompheng
http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c File src/cmd/gc/typecheck.c (right): http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c#newcode744 src/cmd/gc/typecheck.c:744: yyerror("impossible type assertion: %lN cannot have dynamic type %T" ...
12 years, 6 months ago (2012-09-01 13:20:40 UTC) #2
rsc
http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c File src/cmd/gc/typecheck.c (right): http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c#newcode744 src/cmd/gc/typecheck.c:744: yyerror("impossible type assertion: %lN cannot have dynamic type %T" ...
12 years, 6 months ago (2012-09-01 14:15:38 UTC) #3
DMorsing
http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c File src/cmd/gc/typecheck.c (right): http://codereview.appspot.com/6500064/diff/4001/src/cmd/gc/typecheck.c#newcode744 src/cmd/gc/typecheck.c:744: yyerror("impossible type assertion: %lN cannot have dynamic type %T" ...
12 years, 6 months ago (2012-09-01 15:02:14 UTC) #4
rsc
> Still, I'm not sure if the suffixes can be written in such a way ...
12 years, 6 months ago (2012-09-01 15:08:40 UTC) #5
DMorsing
Copied over the implementation from subr.c to typecheck.c and updated the CL description to match. ...
12 years, 6 months ago (2012-09-01 15:45:53 UTC) #6
rsc
LGTM Thanks!
12 years, 6 months ago (2012-09-01 16:59:11 UTC) #7
rsc
12 years, 6 months ago (2012-09-01 17:53:00 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=33a62d86ca2f ***

cmd/gc: Suggest *T in error for x.(T) if it would work.

Accomplished by synchronizing the formatting of conversion errors between
typecheck.c and subr.c

Fixes issue 3984.

R=golang-dev, remyoudompheng, rsc
CC=golang-dev
http://codereview.appspot.com/6500064

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b