Skip to content

Fix bug that caused error in type inference when returning from if #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

david-pl
Copy link
Contributor

@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 ;)

@david-pl david-pl requested a review from Roger-luo June 13, 2025 14:01
Copy link
Contributor

PR Preview Action v1.6.1

🚀 View preview at
https://QuEraComputing.github.io/kirin/pr-preview/pr-427/

Built to branch gh-pages at 2025-06-13 14:01 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9684 8578 89% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/kirin/dialects/scf/absint.py 85% 🟢
TOTAL 85% 🟢

updated for commit: 6406515 by action🐍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue during type-inference scf.IfElse with func.return in one body
1 participant