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

Issue 7437049: code review 7437049: go/types: "missing return" check (Closed)

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

Description

go/types: "missing return" check Implementation closely based on Russ' CL 7440047. Future work: The error messages could be better (e.g., instead of "missing return" it might say "missing return (no default in switch)", etc.).

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r 326a3ee842a2 https://code.google.com/p/go #

Patch Set 6 : diff -r 326a3ee842a2 https://code.google.com/p/go #

Total comments: 10

Patch Set 7 : diff -r 10d448aecfbf https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+358 lines, -4 lines) Patch
M src/pkg/go/types/check.go View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/go/types/check_test.go View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A src/pkg/go/types/return.go View 1 2 3 4 1 chunk +186 lines, -0 lines 0 comments Download
M src/pkg/go/types/testdata/decls1.src View 1 2 chunks +4 lines, -4 lines 0 comments Download
A src/pkg/go/types/testdata/stmt1.src View 1 2 3 4 1 chunk +164 lines, -0 lines 0 comments Download

Messages

Total messages: 10
gri
Hello adonovan@google.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years ago (2013-03-01 22:10:30 UTC) #1
rsc
Code looks fine. It would be nice to get the spec in first. https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go File ...
12 years ago (2013-03-01 22:25:30 UTC) #2
gri
Yes, will wait with this for the spec (next on my list). - gri https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go ...
12 years ago (2013-03-01 22:30:50 UTC) #3
rsc
One problem with the hasBreak implementation (I didn't care for my experiment but it matters ...
12 years ago (2013-03-01 22:34:47 UTC) #4
adonovan
On 2013/03/01 22:34:47, rsc wrote: > One problem with the hasBreak implementation (I didn't care ...
12 years ago (2013-03-04 20:19:59 UTC) #5
adonovan
https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go File src/pkg/go/types/return.go (right): https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go#newcode17 src/pkg/go/types/return.go:17: func (check *checker) isTerminating(s ast.Stmt, label string) bool { ...
12 years ago (2013-03-04 20:20:30 UTC) #6
gri
https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go File src/pkg/go/types/return.go (right): https://codereview.appspot.com/7437049/diff/10001/src/pkg/go/types/return.go#newcode17 src/pkg/go/types/return.go:17: func (check *checker) isTerminating(s ast.Stmt, label string) bool { ...
12 years ago (2013-03-04 22:04:04 UTC) #7
rsc
LGTM Please add a TODO to replace hasBreak with something that walks the tree just ...
12 years ago (2013-03-04 22:07:32 UTC) #8
gri
*** Submitted as https://code.google.com/p/go/source/detail?r=4ec840873df1 *** go/types: "missing return" check Implementation closely based on Russ' CL ...
12 years ago (2013-03-04 22:40:37 UTC) #9
gri
12 years ago (2013-03-04 22:51:34 UTC) #10
On Mon, Mar 4, 2013 at 2:07 PM, <rsc@golang.org> wrote:

> LGTM
>
> Please add a TODO to replace hasBreak with something that walks the tree
> just once.
>

Just noticed that I made this change on the wrong workspace. The TODO will
show up in the next CL.
- gri
Sign in to reply to this message.

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