diff options
| author | Anders Leino <aleino@nvidia.com> | 2024-06-10 15:15:02 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-10 05:15:02 -0700 |
| commit | 0974463daf0982626cb2b8c8bb6f494f3e6c9e52 (patch) | |
| tree | ed60c4a010edd13f310f0c170f2f82bd8b5a4329 /docs/design/decl-refs.md | |
| parent | 9a23a9aab3721828526c921db1e779008e133e8f (diff) | |
Fix typos in the docs (#4322)
Diffstat (limited to 'docs/design/decl-refs.md')
| -rw-r--r-- | docs/design/decl-refs.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/design/decl-refs.md b/docs/design/decl-refs.md index 8e863aa8c..34b74a6f4 100644 --- a/docs/design/decl-refs.md +++ b/docs/design/decl-refs.md @@ -34,7 +34,7 @@ Cell a = { 3 }; int b = a.value + 4; ``` -In this case, the expression node for `a.value` can directly reference the declaration of the field `Cell::value`, and from that we can conclude that the type of the field (and hence the expression) is `int. +In this case, the expression node for `a.value` can directly reference the declaration of the field `Cell::value`, and from that we can conclude that the type of the field (and hence the expression) is `int`. In contrast, things get more complicated as soon as we have a language with generics: @@ -158,7 +158,7 @@ There are many queries like "what is the return type of this function?" that typ The `syntax.h` file defines helpers for most of the existing declaration AST nodes for querying properties that should represent substitutions (the type of a variable, the return type of a function, etc.). If you are writing code that is working with a `DeclRef`, try to use these accessors and avoid being tempted to extract the bare declaration and start querying it. -Some things like `Modifier`s aren't (currently) affected by substitutions, so it can make sense to query them on a bare declaration instead of a `DeclRef. +Some things like `Modifier`s aren't (currently) affected by substitutions, so it can make sense to query them on a bare declaration instead of a `DeclRef`. Conclusion ---------- |
