【问题标题】:Argo Error: Ambiguous reference to member ‘curry’Argo 错误:对成员“咖喱”的含糊提及
【发布时间】:2015-10-28 11:05:01
【问题描述】:

我是 GithubArgo 的新手(因为无法在 Swift 中使用 JSonModel)。创建新模型时出现错误,但不知道如何修复。请查看图片了解更多详细信息。

【问题讨论】:

    标签: swift2 xcode7.1


    【解决方案1】:

    我确定您已经解决了,但也许这可以帮助其他人阅读问题:

    在第一个参数上,函数应该是 map () not apply ()

    static func decode(j: JSON) -> Decoded<CountryState> {
            return curry(CountryState.init)
                <^> j <| "id"
                <*> j <| "name"
                <*> j <| "abbrev"
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-15
      • 1970-01-01
      • 2018-02-02
      • 1970-01-01
      • 2020-02-22
      • 1970-01-01
      • 2018-11-09
      • 1970-01-01
      相关资源
      最近更新 更多