When trying to extend an class with a trait with concrete definition like so
trait logmsg
{
printmsg(msg : String) = println(msg)
}
class DimensionUtils extends logmsg {
printmsg("hello")
}
why does the repl give the following error:
**error**
defined trait logmsg
<console>:16: error: not found: value printmsg
printmsg("hello")
{onto the same line astrait logmsg, to prevent the REPL from takingtrait logmsgby itself as a complete definition. this is one of the reasons Scala programmers never put{on a line by itself. (the other is semicolon inference.)