You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler is complaining about type mismatches, priority.first is returning the element of the node, while key2node is expecting the node: Cannot assign value of type 'KeyType?' to subscript of type 'LinkedList<KeyType>.LinkedListNode<KeyType>?'
at line [1]
My solution is to change key2node[key] = first of insert()[1]
with key2node[key] = priority.node(at: 0).
The text was updated successfully, but these errors were encountered:
The compiler is complaining about type mismatches, priority.first is returning the element of the node, while key2node is expecting the node:
Cannot assign value of type 'KeyType?' to subscript of type 'LinkedList<KeyType>.LinkedListNode<KeyType>?'
at line [1]
My solution is to change
key2node[key] = first
ofinsert()
[1]with
key2node[key] = priority.node(at: 0)
.The text was updated successfully, but these errors were encountered: