object X extends App {
def f = {
val t = 1 -> 2
Map(1 -> 2) + t
}
}
When one executes inline local value on
t
this is the result:object X extends App {
def f = {
Map(1 -> 2) + 1 -> 2
}
}
This is no valid code since the
1 -> 2
is not surrounded with parentheses.
Leave a comment
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|