Created
December 24, 2010 10:47
-
-
Save lopex/754104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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