1 // errchk $G -e $D/$F.go
3 // Copyright 2011 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.
18 si := []int64{'h', 'e', 'l', 'l', 'o'}
28 _ = []int64(s) // ERROR "cannot convert.*\[\]int64"
32 _ = Tint64(s) // ERROR "cannot convert.*Tint64"
36 _ = []rune(sb) // ERROR "cannot convert.*\[\]rune"
37 _ = []int64(sb) // ERROR "cannot convert.*\[\]int64"
40 _ = Trune(sb) // ERROR "cannot convert.*Trune"
41 _ = Tint64(sb) // ERROR "cannot convert.*Tint64"
44 _ = []byte(sr) // ERROR "cannot convert.*\[\]byte"
46 _ = []int64(sr) // ERROR "cannot convert.*\[\]int64"
48 _ = Tbyte(sr) // ERROR "cannot convert.*Tbyte"
50 _ = Tint64(sr) // ERROR "cannot convert.*Tint64"
52 _ = string(si) // ERROR "cannot convert.* string"
53 _ = []byte(si) // ERROR "cannot convert.*\[\]byte"
54 _ = []rune(si) // ERROR "cannot convert.*\[\]rune"
56 _ = Tstring(si) // ERROR "cannot convert.*Tstring"
57 _ = Tbyte(si) // ERROR "cannot convert.*Tbyte"
58 _ = Trune(si) // ERROR "cannot convert.*Trune"
64 _ = []int64(ts) // ERROR "cannot convert.*\[\]int64"
68 _ = Tint64(ts) // ERROR "cannot convert.*Tint64"
72 _ = []rune(tsb) // ERROR "cannot convert.*\[\]rune"
73 _ = []int64(tsb) // ERROR "cannot convert.*\[\]int64"
76 _ = Trune(tsb) // ERROR "cannot convert.*Trune"
77 _ = Tint64(tsb) // ERROR "cannot convert.*Tint64"
80 _ = []byte(tsr) // ERROR "cannot convert.*\[\]byte"
82 _ = []int64(tsr) // ERROR "cannot convert.*\[\]int64"
84 _ = Tbyte(tsr) // ERROR "cannot convert.*Tbyte"
86 _ = Tint64(tsr) // ERROR "cannot convert.*Tint64"
88 _ = string(tsi) // ERROR "cannot convert.* string"
89 _ = []byte(tsi) // ERROR "cannot convert.*\[\]byte"
90 _ = []rune(tsi) // ERROR "cannot convert.*\[\]rune"
92 _ = Tstring(tsi) // ERROR "cannot convert.*Tstring"
93 _ = Tbyte(tsi) // ERROR "cannot convert.*Tbyte"
94 _ = Trune(tsi) // ERROR "cannot convert.*Trune"