trait LibraryCode {
// This is in a library, I can't change it!:
def someMethod: Unit = {}
}
trait MyCode extends LibraryCode {
var mutable = 0
override def someMethod: Unit = mutable = 1
// Compiler says:
// side-effecting nullary methods are discouraged: suggest defining as `def someMethod()` instead
}
--
You received this message because you are subscribed to the Google Groups "Typelevel Users & Development List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to typelevel+...@googlegroups.com.
To post to this group, send email to type...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/typelevel/CAE45xch7j4_ZonJrnsQPoiS8442%3DLx4UJhEiR63BwFy_Q5k4gQ%40mail.gmail.com.
-Xlint:-nullary-unit,_