Swift REPL hangs on readLine()

When I call readLine() in the Swift REPL, it hangs. A control-Z stops it but nothing else does. Example:

$ swift
Welcome to Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7).
Type :help for assistance.
  1> readLine()
testing
more?
how many lines is a line???
^D^A^B^C^E^F^G^H
^K^L
^N^O^R
^D^E^F^G^H
^K^L
^N^P^R
^D^E^F^G^H
^K^L
^N^P^R
^D^E^F^G^H
^K^L
^W^X^Y^Z
[1]+  Stopped                 swift
$
2 Likes