New Issue: Extend control-flow declarations to allow non-class types?

17576, "vasslitvinov", "Extend control-flow declarations to allow non-class types?", "2021-04-16T03:34:03Z"

This is a variation on #13639.
"Control-flow declarations" were formerly called "if-var" and "while-var", introduced in #17047 and #17304.

Right now control-flow declarations accept expressions only of class types. This issue asks whether we want to generalize them to all types that can be used in conditionals. For example:

if const i = someIntegerFunction() {
  // here 'i' is non-0
}