Skip to content

Instantly share code, notes, and snippets.



Last active Jun 12, 2019
What would you like to do?
package metaobjectTest
Annotation 'deprecated' should be attached to a method.
Whenever there is a possible message passing that can call
the method, an error message is issued at compile-time
object Deprecated
@deprecated("Method 'outdatedMethod:' was replaced by 'newMethod:'")
func outdatedMethod: String s { }
func newMethod: String s { "Use this" println }
func run {
// error if uncommented
// self outdatedMethod: "error if uncommented";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment