Created
June 13, 2018 23:18
-
-
Save joseoliv/5ec8fdabfa6761e8be0ac4978675a4ac to your computer and use it in GitHub Desktop.
Metaobject annot
This file contains 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
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