diff --git a/docs/syntax-attribute-functions-deprecated.md b/docs/syntax-attribute-functions-deprecated.md index 59b465c..1111e1e 100644 --- a/docs/syntax-attribute-functions-deprecated.md +++ b/docs/syntax-attribute-functions-deprecated.md @@ -15,16 +15,16 @@ This RFC proposes the introduction of a `@deprecated` attribute to mark deprecat ## Design -The `@deprecated` attribute can take upto two named string parameters. The parameters affect the warning message issued by the linter. The `reason` parameter gives the reason for deprecation and the `use` parameter gives the name of the function that should be used in lieu of the deprecated function. The following table shows the warning message issued by the different styles of this attribute when used on a function named `foo`. +The `@deprecated` attribute can only be used on named functions and methods. It does not apply recursively to the functions defined within the lexical scope of the attributed function. It can take upto two named string parameters. The parameters affect the warning message issued by the linter. The `reason` parameter gives the reason for deprecation and the `use` parameter gives the name of the function that should be used in lieu of the deprecated function. The following table shows the warning message issued by the different styles of this attribute when used on a function named `foo`. | Style | Message | | ----------------------------------------------- | -----------------------------------------------------------------------| | `@deprecated` | `"Function 'foo' is deprecated."` | | `@[deprecated {reason = string}]` | `"Function 'foo' is deprecated. "` | -| `@[deprecated {use = string}]` | `"Function 'foo' is deprecated. Use '' instead."` | -| `@[deprecated {reason = string, use = string}]` | `"Function 'foo' is deprecated. Use '' instead. ` | +| `@[deprecated {use = string}]` | `"Function 'foo' is deprecated, use '' instead."` | +| `@[deprecated {reason = string, use = string}]` | `"Function 'foo' is deprecated, use '' instead. ` | -The `@deprecated` attribute can only be used on named functions and methods. It does not apply recursively to the functions defined within the lexical scope of the attributed function. +If `foo` is a member of class `bar`, the warning messages above will start as `"Member 'bar.foo' is deprecated ...`. ## Related Work