1
0
mirror of https://github.com/mgechev/revive.git synced 2025-02-13 13:48:36 +02:00
revive/testdata/redefines-builtin-id.go
Markus Zimmermann b9814276b6
Remove built-in types that existing only for the Go documentation (#675)
Since these types only exist for documenting Go's standard library there
should be no reason to mark them.

Closes #673
2022-04-08 15:18:18 +02:00

32 lines
855 B
Go

package fixtures
func (this data) vmethod() {
nil := true // MATCH /assignment creates a shadow of built-in identifier nil/
iota = 1 // MATCH /assignment modifies built-in identifier iota/
}
func append(i, j int) { // MATCH /redefinition of the built-in function append/
}
type string int16 // MATCH /redefinition of the built-in type string/
func delete(set []int64, i int) (y []int64) { // MATCH /redefinition of the built-in function delete/
for j, v := range set {
if j != i {
y = append(y, v)
}
}
return
}
type any int // MATCH /redefinition of the built-in type any/
func any() {} // MATCH /redefinition of the built-in type any/
var any int // MATCH /redefinition of the built-in type any/
const any = 1 // MATCH /redefinition of the built-in type any/
var i, copy int // MATCH /redefinition of the built-in function copy/