Instantly share code, notes, and snippets.

Embed
What would you like to do?
Metaobject annot
package metaobjectTest
@annot("correct this")
@annot( [ 2, 3, 5, 7 ] )
object Annot
func run {
var Int count = 0;
for Any any in self annotList {
if any asString == "correct this" {
++count
}
else if any asString == [ 2, 3, 5, 7 ] {
++count
}
}
assert count == 2;
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment