我正在玩Scala 3功能出口条款。
一切正常,除了不透明的类型。
我找不到对他们的任何限制。我的不透明类型:
opaque type BpmnPath = String
object BpmnPath:
def apply(path: String): BpmnPath = path我的出口:
package camundala
export model.BpmnPath用法:
package camundala
package dsl
trait DSL :
def path(pathStr: String): BpmnPath =
BpmnPath(pathStr)这给了我以下例外:
Found: camundala.model.exports$package.BpmnPath
Required: camundala.BpmnPath²
where: BpmnPath is a type in package object exports$package
BpmnPath² is a type in package object exports$package which is an alias of camundala.model.BpmnPath发布于 2021-06-20 15:34:52
我在Scala贡献者论坛上问了这个问题。
结果发现这是一个用3.0.1-RC1修复的bug。
https://stackoverflow.com/questions/67958398
复制相似问题