【发布时间】:2012-07-15 23:41:42
【问题描述】:
在 specs2 中有一个名为 Around 的方法,documented here,其示例如下:
object http extends Around {
def around[T <% Result](t: =>T) = openHttpSession("test") {
t // execute t inside a http session
}
}
此代码的来源可以在here找到。
我很好奇
编辑:这是关于这个主题的可靠答案,What are Scala context and view bounds?
【问题讨论】:
-
Google 很难搜索符号,但 PDF 查看器非常好:看看Scala Language Specification(或“SLS”)。这种类型限制的术语是“View Bounds”。
-
我必须使用这个特定于符号的搜索引擎才能找到它:symbolhound.com