typePatternExprsExposedToChild
The following rules apply to a statement while (e) S: - A pattern variable introduced by e when true is definitely matched at S. https://docs.oracle.com/javase/specs/jls/se22/html/jls-6.html#jls-6.3.2.3