Debian Codegraph @

staticcheck/sa4015/testdata/go1.18/CheckMathInt/CheckMathInt.go

raw
1 package pkg
2
3 import "math"
4
5 func fn3[S int8 | int16](x S) {
6 math.Ceil(float64(x)) //@ diag(`on a converted integer is pointless`)
7 }
8
9 func fn4[S int8 | int16 | float32](x S) {
10 math.Ceil(float64(x))
11 }