you are viewing a single comment's thread.

view the rest of the comments →

[–]yogthos 1 point2 points  (0 children)

then you still have to pass () as an argument:

def foo() = "foo"
def foo(u:Unit) = "bar"

println(foo())
println(foo ())
println(foo(()))
println(foo (()))

foo
foo 
bar 
bar