Naked 'extends' keyword

scala

Solution

This just came up on the ML:

https://groups.google.com/forum/#!topic/scala-user/_qMoODIBQtE

followed by an itchy finger to deprecate the syntax:

https://groups.google.com/d/msg/scala-internals/8zlyUH3S7sU/0EFiLSx9B68J

Here is the link to the syntax:

https://github.com/scala/scala-dist/blob/2.10.x/documentation/src/reference/SyntaxSummary.tex#L272

Basically, `object Foo { }` is the same as `object Foo extends { }`.

Footnote: the snippet in question is withless:

object EchoForm extends {
  def render = {
    //snip
  }
}

Problem

I was puzzling through the Lift Cookbook for AJAX Forms, and I ran across the following object declaration: ``` object EchoForm extends { ``` This was confusing, so I tried it out, and it compiled fine. My Eclipse IDE doesn't seem to indicate that any additional features were inherited, but I suppose I don't trust keywords that are just 'hanging out'. Does this 'naked' `extends` do anything, or is it parsed as 'extends nothing in particular'?

Original source