Commit f7474f2
authored
Fix bug that caused error in type inference when returning from if (#427)
@weinbe58 @Roger-luo I'm still not 100% certain what the issue was, but
this fixes #402 .
I think it's because using the `frame` instead of creating a new one
meant it still had the function as `node` rather than the actual
`IfElse` statement. So we do need to create a new one here. Is that
correct?
Please take a look and let me know whether that explanation is correct,
I'd like to take this opportunity to learn ;)1 parent 80af27d commit f7474f2
File tree
2 files changed
+24
-3
lines changed- src/kirin/dialects/scf
- test/analysis/dataflow/typeinfer
2 files changed
+24
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
0 commit comments