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 parsing of unrecognized attributes #315

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bbrk24
Copy link

@bbrk24 bbrk24 commented Sep 29, 2022

Fixes #310

Overview

If Mockingbird encounters an unrecognized attribute, it gets stuck in an infinite loop. Although this was first noticed with @Sendable, the introduction of global actors means that there may be arbitrary attributes which are unknowable to the generator.

This PR fixes the behavior when encountering an unrecognized attribute, so that the generator no longer gets stuck.

Test Plan

I added a test case which uses @NotARealAttribute to test that the parser skips over unrecognized attributes.

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.

Infinite loop when a function parameter has an unknown attribute
1 participant