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

Optional @objc property #330

Open
paiv opened this issue Jan 24, 2020 · 0 comments
Open

Optional @objc property #330

paiv opened this issue Jan 24, 2020 · 0 comments
Labels
enhancement good first issue If you're looking to contribute, this issue is the way to go!

Comments

@paiv
Copy link

paiv commented Jan 24, 2020

Trying to mock this protocol:

@objc protocol Example {
    @objc optional var ignore: String { get }
}

Generates mock class with compilation error:

     var ignore: String {
        get {
            return cuckoo_manager.getter("ignore",
                superclassCall:
                    
                    Cuckoo.MockManager.crashOnProtocolSuperclassCall()
                    ,
                defaultCall: __defaultImplStub!.ignore)
//                                              ^
// Value of optional type 'String?' must be unwrapped to a value of type 'String'
        }
        
    }
@MatyasKriz MatyasKriz added enhancement help wanted This issue is asking for a way to solve a problem. labels Feb 29, 2020
@MatyasKriz MatyasKriz added good first issue If you're looking to contribute, this issue is the way to go! and removed help wanted This issue is asking for a way to solve a problem. labels May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue If you're looking to contribute, this issue is the way to go!
Projects
None yet
Development

No branches or pull requests

2 participants