Your code is not correct. When run from a file, a syntax error is reported:
SyntaxError: Unexpected token (
There was a bug in REPL where in the case of a syntax error, REPL assumed the code to evaluate is not complete and would span multiple lines. Regardless of the type of syntax error.
The issue was fixed in v0.11.7 by commit 9ef9a9d. See the commit message for more details.