Source file test/fixedbugs/bug238.go
1 // errorcheck 2 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. 6 7 // Test case for issue 471. This file shouldn't compile. 8 9 package main 10 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" 18 const h bool = false 19 const i int = 2 20 const j float64 = 5 21 22