KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Why does line #2 below compile? It's (seemingly) not giving the required constructor arg. class F(x: => Unit) {} new F // Compiles (strange) def f(x: =>Unit) = () f // Does not compile (good) Is it permitted sugar just for this special case? Can you point to docs on the subject? I'm using Scala 2.9.0.
Tags (comma-separated)
Save Edits
Cancel