Skip to content

Fix parsing of unrecognized attributes - #315

Open
bbrk24 wants to merge 2 commits into
typealiased:masterfrom
Tiny-Home-Consulting:master
Open

Fix parsing of unrecognized attributes#315
bbrk24 wants to merge 2 commits into
typealiased:masterfrom
Tiny-Home-Consulting:master

Conversation

@bbrk24

@bbrk24 bbrk24 commented Sep 29, 2022

Copy link
Copy Markdown

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