Commit 6c241d3
authored
Prepare bodies of inline forwarders eagerly (#16757)
* Fix context owner of `PrepareInlineable.registerInlineInfo`. It should
have as owner the inline method (`forwarder` in this case).
* Eagerly compute the inlinable RHS. Because we create the forwarder
already typed, we do not evaluate/force in typer the
`LazyBodyAnnotation` which is what triggers the computation of the
inline accessors. This happened in posttyper which was too late. There
might be a cleaner solution to this problem, maybe forcing the
annotation explicitly.
Fixes #14131
Fixes #16469File tree
3 files changed
+38
-4
lines changed- compiler/src/dotty/tools/dotc/typer
- tests
- pos-macros
- pos
3 files changed
+38
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
| 1230 | + | |
1230 | 1231 | | |
1231 | 1232 | | |
1232 | | - | |
1233 | | - | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1234 | 1244 | | |
1235 | | - | |
1236 | | - | |
1237 | 1245 | | |
1238 | 1246 | | |
1239 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments