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

Issue 6614058: code review 6614058: cmd/gc: replace "typechecking loop" by nicer errors in ... (Closed)

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

Description

cmd/gc: replace "typechecking loop" by nicer errors in some cases. For issue 3757: BEFORE: test/fixedbugs/bug463.go:12: typechecking loop involving a test/fixedbugs/bug463.go:12 a test/fixedbugs/bug463.go:12 <node DCLCONST> AFTER: test/fixedbugs/bug463.go:12: constant definition loop test/fixedbugs/bug463.go:12: a uses a For issue 3937: BEFORE: test/fixedbugs/bug464.go:12: typechecking loop involving foo test/fixedbugs/bug464.go:12 <T> test/fixedbugs/bug464.go:12 foo test/fixedbugs/bug464.go:12 <node DCLFUNC> AFTER: test/fixedbugs/bug464.go:12: foo is not a type Fixes issue 3757. Fixes issue 3937.

Patch Set 1 #

Patch Set 2 : diff -r 308dea0e3d68 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 308dea0e3d68 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 308dea0e3d68 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r c122c85d0363 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -1 line) Patch
M src/cmd/gc/typecheck.c View 1 2 3 3 chunks +40 lines, -1 line 0 comments Download
A test/fixedbugs/bug463.go View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A test/fixedbugs/bug464.go View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 7
remyoudompheng
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 6 months ago (2012-10-07 08:10:21 UTC) #1
remyoudompheng
For longer loops it will print: ./titi2.go:5: constant a refers to itself: used by c ...
11 years, 6 months ago (2012-10-07 08:11:17 UTC) #2
rsc
I like the new messages, especially for the non-loops. For the actual loops, please format ...
11 years, 6 months ago (2012-10-07 14:09:49 UTC) #3
remyoudompheng
Hello golang-dev@googlegroups.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
11 years, 6 months ago (2012-10-07 14:50:57 UTC) #4
remyoudompheng
New error format: i leave the "refers to itself" in the test case because that's ...
11 years, 6 months ago (2012-10-07 14:52:21 UTC) #5
rsc
LGTM
11 years, 6 months ago (2012-10-07 15:22:14 UTC) #6
remyoudompheng
11 years, 6 months ago (2012-10-07 15:35:27 UTC) #7
*** Submitted as http://code.google.com/p/go/source/detail?r=986908b3e4ae ***

cmd/gc: replace "typechecking loop" by nicer errors in some cases.

For issue 3757:
BEFORE:  test/fixedbugs/bug463.go:12: typechecking loop involving a
             test/fixedbugs/bug463.go:12 a
             test/fixedbugs/bug463.go:12 <node DCLCONST>
AFTER:   test/fixedbugs/bug463.go:12: constant definition loop
             test/fixedbugs/bug463.go:12: a uses a

For issue 3937:
BEFORE: test/fixedbugs/bug464.go:12: typechecking loop involving foo
            test/fixedbugs/bug464.go:12 <T>
            test/fixedbugs/bug464.go:12 foo
            test/fixedbugs/bug464.go:12 <node DCLFUNC>
AFTER:  test/fixedbugs/bug464.go:12: foo is not a type

Fixes issue 3757.
Fixes issue 3937.

R=golang-dev, rsc
CC=golang-dev
http://codereview.appspot.com/6614058
Sign in to reply to this message.

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