ios - Swift segmentation fault 11 due to variable scope -


The following code causes IDE to fail Xcode, and swiftc throws partition split (11):

  func testDeviceWillNotify () {Hope expected = (Details will be "ready.") Category FooMock: Foo {func accessoryDidConnect () {expectation.fulfill ()}} // ...}  

If I expectation.fulfill () does everything right then comment. I hope Have tried to expect and ? But any reference to expected is due to Xcode crashing.

Using Xcode 6.1 (6A 1052D) And its extremely disappointing Do anyone know a way around this bug? Even writing a test will have another way.

I do not know how it believes your code to work because the internal area is in the law area Automatically capture the variable in

This is an optional solution

  class FooMock: Foo {var accessoryDidConnectFunc: (zero -> zero)? Func accessoryDidConnect () {accessoryDidConnectFunc? ()}} Func testDeviceWillNotify () {Hope expected = ("will be ready.") Foo = FooMock () foo.accessoryDidConnectFunc = {expectation.fulfill ()} // give ...}  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -