Skip to content

Instantly share code, notes, and snippets.

@joseoliv
Created June 13, 2018 23:18
Show Gist options
  • Save joseoliv/5ec8fdabfa6761e8be0ac4978675a4ac to your computer and use it in GitHub Desktop.
Save joseoliv/5ec8fdabfa6761e8be0ac4978675a4ac to your computer and use it in GitHub Desktop.
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