Closed xermicus closed 1 year ago
Merging #1569 (b6ba9df) into main (242ebfd) will decrease coverage by
0.08%
. The diff coverage is100.00%
.:exclamation: Current head b6ba9df differs from pull request most recent head 65b71bd. Consider uploading reports for the commit 65b71bd to get more accurate results
@@ Coverage Diff @@
## main #1569 +/- ##
==========================================
- Coverage 87.41% 87.34% -0.08%
==========================================
Files 133 133
Lines 64133 64148 +15
==========================================
- Hits 56063 56029 -34
- Misses 8070 8119 +49
Files | Coverage Δ | |
---|---|---|
src/codegen/expression.rs | 95.28% <100.00%> (ø) |
|
src/sema/types.rs | 95.20% <100.00%> (+0.01%) |
:arrow_up: |
I changed the fix to use the RHS type of the assignment. Which seems to fix a bunch of cases (see codegen tests).
The FIXME
added to the constant folding codegen test should go away after #1450. Unless there is easy fix for this, I think it deserves a dedicated fix (in the sense of a unused variable pass after codegen / until it converges). Otherwise the problem might only be partially fixed.
When resolving an assignment, the resolved variable should inherit the RHS type to avoid various issues in later compilation stages (for example with assignment chains).