Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Metaobject addBeforeMethod
package metaobjectTest
@addBeforeMethod("zero", "logStr = logStr ++ \"called zero\";")
object AddBeforeMethod
func run {
assert zero == 0;
assert logStr == "called zero";
func zero -> Int {
return 0;
var String logStr = "";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment