Mantas created ZEPPELIN-3073:
--------------------------------
Summary: Zeppelin cache object method param if value with the same
name is used after object creation
Key: ZEPPELIN-3073
URL: https://issues.apache.org/jira/browse/ZEPPELIN-3073
Project: Zeppelin
Issue Type: Bug
Affects Versions: 0.7.1
Reporter: Mantas
It seems that Zeppelin cache object method parameter if value with the same
name exists before object creation and we are using the value with the same
name as parameter after object creation.
{code:scala}
val myValA = 1
object ExampleAObject {
def printValue(myValA: Int) = {
println(s">>>> from object: $myValA")
}
}
val myValA = 2
println(s">>>> direct: $myValA")
ExampleAObject.printValue(myValA)
val myValA = 3
println(s">>>> direct: $myValA")
ExampleAObject.printValue(myValA)
ExampleAObject.printValue(4)
{code}
!https://imgur.com/a/YiAec!
Everything works fine if we do not use value with the same name as parameter
after object creation.
{code:scala}
val myValA2 = 1
object ExampleA2Object {
def printValue(myValA2: Int) = {
println(s">>>> from object: $myValA2")
}
}
val someValA2 = 2
println(s">>>> direct: $someValA2")
ExampleA2Object.printValue(someValA2)
val someValA2 = 3
println(s">>>> direct: $someValA2")
ExampleA2Object.printValue(someValA2)
ExampleA2Object.printValue(4)
{code}
!https://imgur.com/a/YCVSU!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)