Skip to content

Instantly share code, notes, and snippets.

@lopex
Created December 24, 2010 10:47
Show Gist options
  • Save lopex/754104 to your computer and use it in GitHub Desktop.
Save lopex/754104 to your computer and use it in GitHub Desktop.
object aop {
trait A {
def foo
}
class B extends A {
def foo = println("foo")
}
trait Around extends A {
abstract override def foo = {println("pre");super.foo;println("post")}
}
def main(args: Array[String]) {
val a = new B with Around
a.foo
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment