honnef.co/go/tools@v0.5.0-0.dev.0.20240520180541-dcae280a5e87/staticcheck/sa4015/testdata/src/example.com/CheckMathInt/CheckMathInt.go (about) 1 package pkg 2 3 import "math" 4 5 func fn(x int) { 6 math.Ceil(float64(x)) //@ diag(`on a converted integer is pointless`) 7 math.Floor(float64(x * 2)) //@ diag(`on a converted integer is pointless`) 8 } 9 10 func fn3[S int8 | int16](x S) { 11 math.Ceil(float64(x)) //@ diag(`on a converted integer is pointless`) 12 } 13 14 func fn4[S int8 | int16 | float32](x S) { 15 math.Ceil(float64(x)) 16 }