From 9c74c5dba4e09d0a837ec615749ea2afeb44823b Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 6 Jul 2023 11:30:30 -0700 Subject: [PATCH] Narrow example addr pattern to self. (#2970) Although discussed for other situations, `self` is the only concrete use-case of `addr`. --- docs/design/classes.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/design/classes.md b/docs/design/classes.md index 5fb04896c1c3..64ffd3d7d4db 100644 --- a/docs/design/classes.md +++ b/docs/design/classes.md @@ -904,10 +904,10 @@ Assert(Math.Abs(c.Diameter() - 4.0) < 0.001); - `c.Expand(`...`)` does modify the value of `c`. This is signified using `[addr self: Self*]` in the method declaration. -The pattern '`addr` _patt_' means "first take the address of the argument, which -must be an +The pattern '`addr self:` _type_' means "first take the address of the argument, +which must be an [l-value](), and -then match pattern _patt_ against it". +then match pattern '`self:` _type_' against it". If the method declaration also includes [deduced generic parameters](/docs/design/generics/overview.md#deduced-parameters),