Apply suggestions from code review
Apply suggestions from code review

Co-authored-by: Ondřej Lhoták <b2da3265e1d7bdebc1cdd5d7f1d9059db3042d4f@uwaterloo.ca>
sjrd/dotty,dotty-staging/dotty,lampepfl/dotty,sjrd/dotty,sjrd/dotty,dotty-staging/dotty,lampepfl/dotty,dotty-staging/dotty,sjrd/dotty,dotty-staging/dotty,lampepfl/dotty,dotty-staging/dotty,lampepfl/dotty,sjrd/dotty,lampepfl/dotty