bug1275.scala
来自「JAVA 语言的函数式编程扩展」· SCALA 代码 · 共 15 行
SCALA
15 行
// tested using Scala compiler version 2.6.0-RC1 -- (c) 2002-2007 LAMP/EPFL// prompted by "Covariant return types" mailing list questionobject TestCovariance { // see Type constructor polymorphism in http://www.scala-lang.org/docu/changelog.html trait Seq[+t] { type MyType[+t] <: Seq[t] def f: MyType[t] } def span[a, s <: Seq[a] { type MyType <: s } ](xs: s): s = xs f}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?