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 9package main 10 11const a *int = 1 // ERROR "convert|wrong|invalid" 12const b [2]int = 2 // ERROR "convert|wrong|invalid" 13const c map[int]int = 3 // ERROR "convert|wrong|invalid" 14const d chan int = 4 // ERROR "convert|wrong|invalid" 15const e func() = 5 // ERROR "convert|wrong|invalid" 16const f struct{} = 6 // ERROR "convert|wrong|invalid" 17const g interface{} = 7 // ERROR "constant|wrong|invalid" 18const h bool = false 19const i int = 2 20const j float64 = 5 21 22