gpt4 book ai didi

scala 泛型函数 `not found: type ?`

转载 作者:行者123 更新时间:2023-12-02 01:24:30 24 4
gpt4 key购买 nike

当我使用 scala 创建这样的函数时,它告诉我 not found: type ?

scala
def save[
K: SpatialComponent: TypeTag,
V <: CellGrid: TypeTag: ? => TileMergeMethods[V]: ? => TilePrototypeMethods[V]
](id: LayerId, rdd: RDD[(K, V)] with Metadata[TileLayerMetadata[K]], method: KeyIndexMethod[K])

谁能告诉我如何解决这个问题?

最佳答案

我明白了,必须将此代码添加到 build.sbt。

resolvers += Resolver.sonatypeRepo("releases")
addCompilerPlugin("org.spire-math" % "kind-projector" % "0.8.0" cross CrossVersion.binary)

https://github.com/non/kind-projector

关于scala 泛型函数 `not found: type ?`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37914942/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com