Skip to content

Instantly share code, notes, and snippets.

@joseoliv
Last active June 12, 2019 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseoliv/54120aa45b6af5f8b826907d6c37220f to your computer and use it in GitHub Desktop.
Save joseoliv/54120aa45b6af5f8b826907d6c37220f to your computer and use it in GitHub Desktop.
deprecated
package metaobjectTest
@doc{*
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";
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment