[ https://issues.apache.org/jira/browse/SPARK-2452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059267#comment-14059267 ]
Patrick Wendell commented on SPARK-2452: ---------------------------------------- I think we should narrow the description a bit. This is not a problem with all compound statements, it's only a problem if a statement references a variable within another statement. {code} // Reference scala> val x = 10; val y = x + 10 x: Int = 10 y: Int = 20 scala> y <console>:11: error: $VAL11 is already defined as value $VAL11 val $VAL11 = INSTANCE; ^ // Works fine scala> val x = 10; val y = 20 x: Int = 10 y: Int = 20 scala> x res3: Int = 10 scala> y res4: Int = 20 {code} > Multi-statement input to spark repl does not work > ------------------------------------------------- > > Key: SPARK-2452 > URL: https://issues.apache.org/jira/browse/SPARK-2452 > Project: Spark > Issue Type: Bug > Components: Spark Core > Affects Versions: 1.0.0 > Reporter: Timothy Hunter > > Here is an example: > scala> val x = 4 ; def f() = x > x: Int = 4 > f: ()Int > scala> f() > <console>:11: error: $VAL5 is already defined as value $VAL5 > val $VAL5 = INSTANCE; -- This message was sent by Atlassian JIRA (v6.2#6252)