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

Unowned issue #24

Closed
dyrkabes opened this issue Jul 13, 2018 · 4 comments · Fixed by #35
Closed

Unowned issue #24

dyrkabes opened this issue Jul 13, 2018 · 4 comments · Fixed by #35
Assignees

Comments

@dyrkabes
Copy link

Hello there!

There's some error in the library's playground in those lines (317-321):

//: ## Unowned
//: `Unowned` is a wrapper to store unowned references to a `Wrapped` instance.
//: ### Unowned(_:)
//: Initialize with an object reference.
var unowned = Unowned(text)  // error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x60400003f4).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.

I've checked, the text variable is still available.

I also copied the unowned file to my project and tested. Still got an error but in another place:

        let text = NSString(string: "Hello!")
        let unowned = Unowned(text)
        print(unowned.value)  // "Hello!"
        print(unowned)  // Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)

Not sure about the nature of this.

@Jeehut
Copy link
Member

Jeehut commented Jul 13, 2018

Thank you for reporting this, I just checked and you're right, there an error. But I couldn't get behind this on first glance, either. Very weird one indeed...

@fredpi
Copy link
Contributor

fredpi commented May 7, 2019

I could also reproduce this issue and it seems to be a persistent Xcode playground issue. Should we just comment out the lines that cause the playground not to work properly?

@Jeehut
Copy link
Member

Jeehut commented May 7, 2019

@fredpi Makes sense. Let's do it like that. I'm sure you'd love to post the related PR? :)

@fredpi
Copy link
Contributor

fredpi commented May 7, 2019

@Dschee Of course ;)

@fredpi fredpi self-assigned this May 8, 2019
Jeehut added a commit that referenced this issue May 13, 2019
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.

3 participants