- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Override typed method of unknown class
Mon, 2011-06-06, 00:28
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.
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.