Commit 63e4c5b
K2: drop unclear field.initializerResolved check for delegate fields & enums
The property FirVariable.initializerResolved had two problems: in fact,
it was 'initializerHasResolvedType' with no guarantees that the WHOLE
initializer was resolved, and additional check on error expression
making the semantics quite unclear. With return or comparison expressions
as initializer (maybe other cases were possible) this provoked
an exception from KT-82466 as such kind of expression has resolved type
from the beginning (e.g. Nothing) and their children could remain
unresolved for delegate fields.
In this commit I dropped the questionable initializerResolved checks
for delegate fields & enum entries. Both places don't influence our
tests and possible performance impact is also questionable because of
'if (implicitTypeOnly)' check before.
#KT-82466 Fixed1 parent 1a571af commit 63e4c5b
File tree
3 files changed
+8
-9
lines changed- compiler/fir
- analysis-tests/testData/resolve/checkers
- resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve
3 files changed
+8
-9
lines changedWhitespace-only changes.
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
Lines changed: 2 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
123 | | - | |
| 124 | + | |
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| |||
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
304 | | - | |
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| |||
1638 | 1638 | | |
1639 | 1639 | | |
1640 | 1640 | | |
1641 | | - | |
1642 | | - | |
1643 | | - | |
1644 | | - | |
1645 | | - | |
1646 | | - | |
1647 | 1641 | | |
1648 | 1642 | | |
1649 | 1643 | | |
0 commit comments