1 // errchk $G -e $D/$F.go
3 // Copyright 2009 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
7 // Test case for issue 471. This file shouldn't compile.
11 const a *int = 1 // ERROR "convert|wrong|invalid"
12 const b [2]int = 2 // ERROR "convert|wrong|invalid"
13 const c map[int]int = 3 // ERROR "convert|wrong|invalid"
14 const d chan int = 4 // ERROR "convert|wrong|invalid"
15 const e func() = 5 // ERROR "convert|wrong|invalid"
16 const f struct{} = 6 // ERROR "convert|wrong|invalid"
17 const g interface{} = 7 // ERROR "constant|wrong|invalid"
22 func main() { println(a, b, c, d, e, f, g) }