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

Issue 67020043: code review 67020043: reflect: better error for walking through nil embedded ... (Closed)

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

Description

reflect: better error for walking through nil embedded struct pointer The old error was "call of reflect.Value.Field on ptr Value". http://play.golang.org/p/Zm-ZbQaPeR

Patch Set 1 #

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

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

Total comments: 1

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -1 line) Patch
M src/pkg/reflect/all_test.go View 1 2 3 2 chunks +24 lines, -0 lines 0 comments Download
M src/pkg/reflect/value.go View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 5
rsc
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
11 years, 4 months ago (2014-02-21 16:35:34 UTC) #1
r
https://codereview.appspot.com/67020043/diff/30001/src/pkg/reflect/value.go File src/pkg/reflect/value.go (right): https://codereview.appspot.com/67020043/diff/30001/src/pkg/reflect/value.go#newcode894 src/pkg/reflect/value.go:894: panic("reflect: nil embedded struct pointer during field lookup") that's ...
11 years, 4 months ago (2014-02-21 17:26:20 UTC) #2
rsc
On 2014/02/21 17:26:20, r wrote: > https://codereview.appspot.com/67020043/diff/30001/src/pkg/reflect/value.go > File src/pkg/reflect/value.go (right): > > https://codereview.appspot.com/67020043/diff/30001/src/pkg/reflect/value.go#newcode894 > ...
11 years, 4 months ago (2014-02-21 17:29:59 UTC) #3
r
LGTM
11 years, 4 months ago (2014-02-21 18:05:04 UTC) #4
rsc
11 years, 4 months ago (2014-02-21 18:51:25 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=9df0e0777b28 ***

reflect: better error for walking through nil embedded struct pointer

The old error was "call of reflect.Value.Field on ptr Value".

http://play.golang.org/p/Zm-ZbQaPeR

LGTM=r
R=golang-codereviews, r
CC=golang-codereviews
https://codereview.appspot.com/67020043
Sign in to reply to this message.

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