2020-02-18 19:38:01 +02:00
|
|
|
// Copyright 2020 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package fixtures
|
|
|
|
|
|
|
|
type A string
|
|
|
|
type B = string
|
|
|
|
type C int
|
|
|
|
type D = uintptr
|
|
|
|
|
|
|
|
func StringTest() {
|
|
|
|
var (
|
|
|
|
i int
|
|
|
|
j rune
|
|
|
|
k byte
|
|
|
|
l C
|
|
|
|
m D
|
|
|
|
n = []int{0, 1, 2}
|
|
|
|
o struct{ x int }
|
|
|
|
)
|
|
|
|
const p = 0
|
2021-10-14 20:56:29 +02:00
|
|
|
_ = string(i) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
2020-02-18 19:38:01 +02:00
|
|
|
_ = string(j)
|
|
|
|
_ = string(k)
|
2021-10-14 20:56:29 +02:00
|
|
|
_ = string(p) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
|
|
|
_ = A(l) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
|
|
|
_ = B(m) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
|
|
|
_ = string(n[1]) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
|
|
|
_ = string(o.x) // MATCH /dubious conversion of an integer into a string, use strconv.Itoa/
|
2020-02-18 19:38:01 +02:00
|
|
|
}
|