首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >`#`运算符在Scala中是什么意思?

`#`运算符在Scala中是什么意思?
EN

Stack Overflow用户
提问于 2012-02-25 17:57:16
回答 3查看 15.7K关注 0票数 141

我在这个博客中看到了这段代码:Type-Level Programming in Scala

代码语言:javascript
运行
复制
// 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]中有一个我从未见过的运算符#。由于它很难搜索(被搜索引擎忽略),谁能告诉我它是什么意思?

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9443004

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档