-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal
Milestone
Description
by RickySeltzer:
var each1 = []byte{'e', 'a', 'c', 'h'}
const each2 = []byte{'e', 'a', 'c', 'h'}
The 'var' is accepted, the 'const' is not. This is a defect in the language spec and
design.
1. What is a short input program that triggers the error?
http://play.golang.org/p/Jbo9waCn_h
2. What is the full compiler output?
prog.go:7: const initializer []byte literal is not a constant
[process exited with non-zero status]smyrman, CAFxX, romshark, deanveloper, pvva and 59 moredchapes
Metadata
Metadata
Assignees
Labels
LanguageChangeSuggested changes to the Go languageSuggested changes to the Go languageLanguageChangeReviewDiscussed by language change review committeeDiscussed by language change review committeeProposal