2012-02-16 21:49:59 -07:00
|
|
|
// errorcheck
|
2011-07-27 12:45:27 -06:00
|
|
|
|
2016-04-10 15:32:26 -06:00
|
|
|
// Copyright 2011 The Go Authors. All rights reserved.
|
2011-07-27 12:45:27 -06:00
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
// issue 1662
|
|
|
|
// iota inside var
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
var (
|
2020-12-09 21:14:07 -07:00
|
|
|
a = iota // ERROR "undefined: iota|iota is only defined in const|cannot use iota outside constant declaration"
|
|
|
|
b = iota // ERROR "undefined: iota|iota is only defined in const|cannot use iota outside constant declaration"
|
|
|
|
c = iota // ERROR "undefined: iota|iota is only defined in const|cannot use iota outside constant declaration"
|
2011-07-27 12:45:27 -06:00
|
|
|
)
|