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

False alarm for new async properties and implicit_getter #3684

Closed
basememara opened this issue Aug 2, 2021 · 1 comment · Fixed by #3743
Closed

False alarm for new async properties and implicit_getter #3684

basememara opened this issue Aug 2, 2021 · 1 comment · Fixed by #3743

Comments

@basememara
Copy link

This triggers a violation for implicit_getter:

class DatabaseEntity {
    var isSynced: Bool {
        get async {
            await database.isEntitySynced(self)
        }
    }
}

There isn't another way to define an async property in Swift 5.5 so the getter is required here. I think if get async is declared for a property, it should not trigger a implicit_getter failure.

@letatas
Copy link

letatas commented Oct 4, 2021

The problem is the same with throws and also with subscripts.

struct Test {
    subscript (value: Int) -> Int {
        get throws {
            if value == 0 {
                throw NSError()
            }
            else {
                return value
            }
        }
    }
}

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 a pull request may close this issue.

2 participants