This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Override typed method of unknown class

No replies
Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Is there any way to get an equivalent of this?

trait FieldVar[T] {this: {def set(value: T): T} =>
  override def set(value: T): T = {    doSomething()     super.set(value)  }
}


I would like to provide a trait that can be mixed in to Lift's Mapper's MappedField subclasses and overrides them, in a project, and not require that project to declare lift-mapper as a dependency.

Thanks.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland