huy-le
6/11/2016 - 1:11 PM

Ambiguous subscript.swift

 struct ViewModel {

        subscript(tasteButton: TasteButton) -> Bool {
            get {
                guard let status = tasteList[tasteButton.rawValue] else {
                    return false
                }
                return status
            }
            
            set(newValue) {
                tasteList[tasteButton.rawValue] = newValue
            }
        }
      }