Prosumma/Guise

Value of type '[(key: AnyKey, value: Registration)]' has no member 'keys'

sirvon opened this issue · 5 comments

I get this error when building on Xcode 9.2 beta, Swift Lang Version is 4.0

var matchedKeys = matched.keys
Value of type '[(key: AnyKey, value: Registration)]' has no member 'keys'

Filter.swift, Line 18

I'll check it out right now.

@sirvon I'm unable to reproduce this bug. I checked out tag 6.2.2 and built for all supported platforms. I also ran the unit tests. I'm using Xcode 9.2 (9C40b). Can you confirm the exact build of Xcode you're using?

@sirvon I'm skeptical that you're using Swift 4.0. matchedKeys should not be a value of type [(key: AnyKey, value: Registration)]. It should be a value of type [AnyKey: Registration]. The filter method used inside of the lock is from the Swift 4.0 standard library and should be

@available(swift 4.0)
public func filter(_ isIncluded: (Dictionary.Element) throws -> Bool) rethrows -> [Dictionary.Key : Dictionary.Value]

You can Ctrl+Cmd+Click on that method in my source to go to the method's definition in the standard library. If it's not the filter method described above, something is wrong with your build setup.

Let me know.

I've released v6.2.3. It doesn't specifically address this, but the code is now different. Give it a try.

@Revolucent, i'll build this project again mixed with your guided instructions and report back.
thanks for your assistance.