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

Swift compiler crash #73

Open
vitorhugomagalhaes opened this issue Jan 2, 2017 · 0 comments
Open

Swift compiler crash #73

vitorhugomagalhaes opened this issue Jan 2, 2017 · 0 comments
Labels

Comments

@vitorhugomagalhaes
Copy link

vitorhugomagalhaes commented Jan 2, 2017

Hi,

While porting the project to Swift 3 I cannot get around some segmentation faults. The scenario is the following. I have an Objective-C protocol:

#import "ViewModelProtocol.h"

@class RACCommand;
@class RACSignal;

@protocol ListViewModelProtocol <ViewModelProtocol>

@property (nonatomic, strong) RACCommand *listItemSelectedCommand;
@property (nonatomic, strong, readonly) RACCommand *reloadDataCommand;
@property (nonatomic, strong) NSArray    *datasource;

@end

Which is implemented in Swift as:

    lazy var reloadDataCommand: RACCommand<AnyObject, AnyObject>! = {
        return RACCommand { (argument) -> RACSignal<AnyObject> in
            return self.reloadDataAction(argument: argument)
        }
    }()

In the end I always get the same error:

1. While emitting SIL for getter for reloadDataCommand at /Users/vmagalhaes/work/ios/nlife/nlife/ViewModels/ParkingViewModel.swift:28:14

Probably this has nothing to do with ReactiveObjc but any help would be appreciated.

There is a reference to something similar but my property is not optional https://bugs.swift.org/browse/SR-1825

Thanks in advance,

@mdiep mdiep added the question label Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants