radlab/SCADS — comment on commit 0a306788beb290a1b18ed52a63c5e7debcc904b6
File: scalaengine/src/main/scala/transactions/TxDB.scala line 63
By kraskat:

Wow, that is nasty!

Thanks for the heads up!

On Sat, Nov 12, 2011 at 1:28 PM, Michael Armbrust <
reply@reply.github.com
> wrote:

> if you don't specify a return type for an abstract function the compiler
> assumes it returns Unit.
>
> Ex:
> ```
> scala> trait X1 { def x }
> defined trait X1
> scala> class X2 extends X1 { def x = "test" }
> defined class X2
> scala> (new X2).x
> ```
>
> Instead of making it return some default value you could also just specify
> the return type:
> ```
> scala> trait Y1 {def y: String}
> defined trait Y1
> scala> class Y2 extends Y1 {def y = "test"}
> defined class Y2
> scala> (new Y2).y
> res2: java.lang.String = test
> ```
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/radlab/SCADS/commit/0a306788beb290a1b18ed52a63c5e7debcc904b6#commitcomment-713422
>