我正在使用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
我在Scala贡献者论坛上问了这个问题。
事实证明,这是一个使用3.0.1-RC1
修复的错误。