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

[3/y] Fix read-only subscripts #285

Merged

Conversation

andrewchang-bird
Copy link
Contributor

@andrewchang-bird andrewchang-bird commented Jan 27, 2022

Stack

πŸ“š #287 [5/y] Improve static mocking APIs
πŸ“š #286 [4/y] Enable mocking sources in test bundles
πŸ“š #285 ← [3/y] Fix read-only subscripts
πŸ“š #284 [2/y] Fix warnings in throwing initializers
πŸ“š #283 [1/y] Add backwards compatibility with Swift 5.5

Overview

Read-only subscripts were incorrectly generating setter thunks which weren’t caught by the test suite due to the generic Equatable overload. This adds the readonly attribute as needed when parsing subscript methods using similar logic as properties.

Closes #281

Test Plan

Fixed read-only subscript tests and added an additional case for setters marked as (file)private.

@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-initializer-warnings branch from bec1ac2 to b558190 Compare January 28, 2022 21:08
Base automatically changed from dev/andrewchang-bird/fix-initializer-warnings to master January 28, 2022 21:09
@andrewchang-bird andrewchang-bird force-pushed the dev/andrewchang-bird/fix-readonly-subscripts branch from 5d87836 to 4b54adc Compare January 28, 2022 21:12
@andrewchang-bird andrewchang-bird merged commit 816fa74 into master Jan 28, 2022
@andrewchang-bird andrewchang-bird deleted the dev/andrewchang-bird/fix-readonly-subscripts branch January 28, 2022 21:14
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.

Error in generated file: "Cannot assign through subscript: subscript is get-only"
2 participants