-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Member 'index' cannot be used on value of protocol type 'collection'; use a generic constraint instead #1593
Comments
No idea why asked here. closing. Stack Overflow is a better place to ask this |
Because these error comes in your framework that's why I am asked here. |
I don't know what's the problem you are talking, either reproducing or where it crashes. |
http://pasteboard.co/1knihIRyg.png |
It seems like an error that should have been raised in compile time. Strange. |
I see no crash there. And no complaint. |
Yes thats compile and build failed. I am using Xcode 8 and swift 3.0. |
Please download the code again, I never saw code like yours on my side: if colorString.hasPrefix("#")
{
var argb: [UInt] = [255, 0, 0, 0]
let colorString = colorString.unicodeScalars
var length = colorString.count
var index = colorString.startIndex
let endIndex = colorString.endIndex
index = colorString.index(after: index) <===== watch this line
length = length - 1
if length == 3 || length == 6 || length == 8 |
if colorString.hasPrefix("#")
{
var argb: [UInt] = [255, 0, 0, 0]
let colorString = colorString.unicodeScalars
var length = colorString.count
var index = colorString.startIndex
let endIndex = colorString.endIndex
The text was updated successfully, but these errors were encountered: