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

c3 linearization doesn't detect cycles #3

Closed
jalexvig opened this issue Aug 28, 2018 · 1 comment
Closed

c3 linearization doesn't detect cycles #3

jalexvig opened this issue Aug 28, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jalexvig
Copy link
Owner

Problem

a.json

{
  "inherits": ["b"]
}

b.json

{
  "inherits": ["a"]
}

Results in infinite recursion.

Solution

Memoize to guard against recursive re-entrance.

@jalexvig jalexvig self-assigned this Aug 28, 2018
@jalexvig jalexvig added the bug Something isn't working label Aug 28, 2018
@jalexvig
Copy link
Owner Author

closed by fe1e148

jalexvig added a commit that referenced this issue Aug 28, 2018
Previously there were no checks against circular inheritance. So `a`
inherits `[b]` and `b` inherits `[a]` would cause stack overflow. Added
hashset to track elements already processed.

close #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant