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

Issue 7008045: code review 7008045: cmd/gc: add diagnostic for var, type, const named init (Closed)

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

Description

cmd/gc: add diagnostic for var, type, const named init Before this CL, defining the variable worked fine, but then when the implicit package-level init func was created, that caused a name collision and a confusing error about the redeclaration. Also add a test for issue 3705 (func init() needs body). Fixes issue 4517.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -0 lines) Patch
M src/cmd/gc/dcl.c View 1 1 chunk +3 lines, -0 lines 0 comments Download
A test/fixedbugs/issue3705.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4517a.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4517b.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A test/fixedbugs/issue4517c.go View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
12 years, 3 months ago (2012-12-22 22:23:27 UTC) #1
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=33b15f6ddadb *** cmd/gc: add diagnostic for var, type, const named init Before ...
12 years, 3 months ago (2012-12-22 22:23:37 UTC) #2
ken3
12 years, 3 months ago (2012-12-22 22:28:01 UTC) #3
Message was sent while issue was closed.
lgtm
Sign in to reply to this message.

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