Skip to content
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

fix: Cycle Detection to Ignore Direct Recursion #44

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

notJoon
Copy link
Contributor

@notJoon notJoon commented Aug 1, 2024

Description

  1. Modified analyzeFuncDecl:

    • Ignores self-calls when building the dependency graph.
    • This prevents direct recursion from being mistaken for a cycle.
  2. Update dfs:

    • Added a check to ignore direct self-reference during cycle delection.

Still correctly identifies indirect cycles (e.g., A -> B -> A).

@notJoon notJoon added the bug bug label Aug 1, 2024
@notJoon notJoon merged commit 3843478 into main Aug 1, 2024
3 checks passed
@notJoon notJoon deleted the ignore-recursion-when-cycle-detection branch August 1, 2024 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant