Descriptioncmd/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/ #
MessagesTotal messages: 3
|