It would be nice to have a warning or something if a test expression is statically simplified to true or false, but they weren't written using true or false literals. This usually means that there was a typo or something.
// not a warning, they wrote true explicitly
if true {
do_thing()
}
// warn, because did you mean to test some other register?
if a == a {
do_thing()
}
It would be nice to have a warning or something if a test expression is statically simplified to true or false, but they weren't written using
trueorfalseliterals. This usually means that there was a typo or something.