我在这个博客中看到这段代码:
// define the abstract types and bounds
trait Recurse {
type Next <: Recurse
// this is the recursive function definition
type X[R <: Recurse] <: Int
}
// implementation
trait RecurseA extends Recurse {
type Next = RecurseA
// this is the implementation
type X[R <: Recurse] = R#X[R#Next]
}
object Recurse {
// infinite loop
type C = RecurseA#X[RecurseA]
}
在代码 R#X[R#Next]
中有一个我从未见过的操作员 #
。既然很难搜索(被搜索引擎忽略) ,谁能告诉我这是什么意思?