Last active
June 12, 2019 17:06
-
-
Save joseoliv/54120aa45b6af5f8b826907d6c37220f to your computer and use it in GitHub Desktop.
deprecated
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 | |
@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