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

Issue 4332041: code review 4332041: test: adjust bug324 to expect run-time failure, not com... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by iant
Modified:
14 years, 1 month ago
Reviewers:
CC:
gri, rsc1, iant2, rsc, golang-dev
Visibility:
Public.

Description

test: adjust bug324 to expect run-time failure, not compile-time. Failing at compile time requires that for each conversion between two interface types the compiler compare the sets of unexported methods to see if they come from different packages. Since this test will fail approximately never on real code, and since it can't catch all cases of the problem, I don't think it's worth testing in the compiler. This CL changes this test to look for a run-time panic rather than a compile-time error.

Patch Set 1 #

Patch Set 2 : diff -r 68146fa8d61a https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M test/bugs/bug324.go View 1 chunk +1 line, -1 line 0 comments Download
M test/bugs/bug324.dir/main.go View 1 chunk +1 line, -1 line 0 comments Download
M test/golden.out View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 8
iant
Hello gri (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 1 month ago (2011-03-29 13:55:28 UTC) #1
rsc1
I am not so sure. Granted, I haven't fixed this bug yet in 6g, but ...
14 years, 1 month ago (2011-03-29 14:07:47 UTC) #2
rsc1
Also, what do you mean by "can't catch all instances of the problem"? Russ
14 years, 1 month ago (2011-03-29 14:14:09 UTC) #3
iant2
Russ Cox <rsc@google.com> writes: > Granted, I haven't fixed this bug yet in 6g, > ...
14 years, 1 month ago (2011-03-29 15:04:15 UTC) #4
rsc1
On Tue, Mar 29, 2011 at 11:03, Ian Lance Taylor <iant@google.com> wrote: > I think ...
14 years, 1 month ago (2011-03-29 18:22:15 UTC) #5
iant2
Russ Cox <rsc@google.com> writes: > On Tue, Mar 29, 2011 at 11:03, Ian Lance Taylor ...
14 years, 1 month ago (2011-03-29 18:50:45 UTC) #6
rsc
LGTM
14 years, 1 month ago (2011-03-29 20:44:46 UTC) #7
iant
14 years, 1 month ago (2011-03-29 22:03:14 UTC) #8
*** Submitted as http://code.google.com/p/go/source/detail?r=f5216d8d01f8 ***

test: adjust bug324 to expect run-time failure, not compile-time.

Failing at compile time requires that for each conversion
between two interface types the compiler compare the sets of
unexported methods to see if they come from different
packages.  Since this test will fail approximately never on
real code, and since it can't catch all cases of the problem,
I don't think it's worth testing in the compiler.  This CL
changes this test to look for a run-time panic rather than a
compile-time error.

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

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