Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Array<any> breaks with .remove() #140

Open
MrBendel opened this issue Jul 17, 2015 · 1 comment
Open

Array<any> breaks with .remove() #140

MrBendel opened this issue Jul 17, 2015 · 1 comment

Comments

@MrBendel
Copy link

Force casting is causing a crash (Could not cast value of type to type):

if (current as! U) != element {
    self.append(current)
}
@MrBendel
Copy link
Author

Changing to as? seems to work

if (current as? U) != element {
     self.append(current)
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant