Commit ebbbd90
Fix #59128
Assignment desugaring of `(const (= (|::| x T) rhs))` would pre-expand
to, then re-expand `(const x ,(convert-for-type-decl rhs T))`, but
two-arg (IR) const is expected to have a simple RHS---closure conversion
doesn't recurse here (should it?), giving us partially-lowered IR, and
hence our bug.
Fix: Pre-expand to the one-arg AST const form `(const (= x
,(convert-for-type-decl rhs T)))` instead. This also gives us a
`(latestworld)` we were missing before, so this lowering may have been
originally intended.
(cherry picked from commit 3de5b9a)
1 parent f36b883 commit ebbbd90
2 files changed
+21
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1642 | 1642 | | |
1643 | 1643 | | |
1644 | 1644 | | |
1645 | | - | |
1646 | | - | |
1647 | | - | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
1648 | 1648 | | |
1649 | 1649 | | |
1650 | 1650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4236 | 4236 | | |
4237 | 4237 | | |
4238 | 4238 | | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
| 4255 | + | |
| 4256 | + | |
4239 | 4257 | | |
4240 | 4258 | | |
4241 | 4259 | | |
| |||
0 commit comments