GitHub user felixcheung opened a pull request: https://github.com/apache/incubator-zeppelin/pull/780
[ZEPPELIN-658] Scala: not accepting companion objects if defined in different lines ### What is this PR for? In Scala, a singleton companion object can be defined along the class. Because of the way code lines are split, the interpreter is not passing the companion object along with the class code, or indicating any possible line continuation (eg. leaving out '}'). This causes an error with the Scala REPL/compiler. ### What type of PR is it? Bug Fix ### Todos * [x] - Fix line splitting * [x] - Add tests ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-658 https://issues.apache.org/jira/browse/ZEPPELIN-747 ### How should this be tested? Add a new paragraph with Scala/Spark interpreter and define a class with its companion object. See bug for more details ### Screenshots (if appropriate) N/A ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No You can merge this pull request into a Git repository by running: $ git pull https://github.com/felixcheung/incubator-zeppelin scalarepl Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-zeppelin/pull/780.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #780 ---- commit 5087dae642fd8a4743f110d5a226208d8b56686e Author: Felix Cheung <felixcheun...@hotmail.com> Date: 2016-03-15T04:05:52Z check for continuation ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---