var test: String = null
def setter(t:String): String = {
test = t
test
}
0
Daenyth
On
Your example doesn't make much sense. If you're inside some scope, vars/vals/defs inside that scope are not accessible from outside that scope - so there's no need for this. You'd just return the value (using implicit return).
According to https://stackoverflow.com/a/8845459/3641692 it is not possible
I have to do it on multiple lines: