Commit 17a9919
docs: the global forward reference is intentional
I had left it open on the grounds that nothing comments on it. Absence
of a comment is not evidence, and two things point the other way.
recurse_defs.bgn defines x ::= y, y ::= z, z ::= y at global scope - a
cycle. It only exists if line 1's reference reaches the y declared on
line 8, so the file cannot be testing what its name says unless forward
resolution works.
typing.cpp:1344 types a definition on demand when resolution lands on one
that has no expr_type yet, and recurse_detect guards the re-entry. That
path is only reachable when a reference resolves to a definition that has
not been typed - which is what a forward reference is. Backward
references land on definitions already typed.
Both were listed as unconfirmed; they are not.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent cbad57e commit 17a9919
1 file changed
Lines changed: 19 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
147 | 161 | | |
148 | 162 | | |
149 | 163 | | |
| |||
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | 191 | | |
181 | 192 | | |
| 193 | + | |
| 194 | + | |
0 commit comments