Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_31). Type in expressions to have them evaluated. Type :help for more information. scala> class Outer { class Inner } defined class Outer scala> trait DepFun { def apply(x: Outer): x.Inner } defined trait DepFun scala> new DepFun { override def apply(x: Outer): x.Inner = new x.Inner } :10: error: overriding method apply in trait DepFun of type (x: Outer)x.Inner; method apply has incompatible type new DepFun { override def apply(x: Outer): x.Inner = new x.Inner } ^