Skip to content

Instantly share code, notes, and snippets.

@maxaf
Created July 10, 2012 15:00
Show Gist options
  • Save maxaf/3083867 to your computer and use it in GitHub Desktop.
Save maxaf/3083867 to your computer and use it in GitHub Desktop.
scalac LOL
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