Created
July 10, 2012 15:00
-
-
Save maxaf/3083867 to your computer and use it in GitHub Desktop.
scalac LOL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Foo { | |
def foo(x: Int, y: Int = 10) = x*y | |
lazy val y = foo(x = 20) | |
} | |
// innocuous.scala:3: error: variable definition needs type because 'y' is used as a named argument in its body. | |
// Error occurred in an application involving default arguments. | |
// lazy val y = foo(x = 20) | |
// ^ | |
// one error found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment