diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-01-08 13:15:45 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-01-08 14:47:14 -0800 |
commit | fc386675692bfaa1d2eb7a96c2bc92b3ad471327 (patch) | |
tree | 7d48f0ad3854f83bbe7543f130e67ce59cdc51d5 /test/files/run/t2544.scala | |
parent | a03e77b8670faa133c76f4d7b29bf362246d20b5 (diff) | |
parent | 1381cda86ddeca1b9829a9c53ff9372cfd816735 (diff) | |
download | scala-fc386675692bfaa1d2eb7a96c2bc92b3ad471327.tar.gz scala-fc386675692bfaa1d2eb7a96c2bc92b3ad471327.tar.bz2 scala-fc386675692bfaa1d2eb7a96c2bc92b3ad471327.zip |
Merge branch '2.10.x'
Patches applied:
- rename of `dropRepeatedParamType` to `dropIllegalStarTypes` -- required since 8886d22cd6
- fixed test/files/neg/t6406-regextract.flags -- how could this have worked before?
Conflicts:
src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala
src/library/scala/collection/LinearSeqOptimized.scala
src/library/scala/util/Properties.scala
test/files/run/streams.check
test/files/run/streams.scala
Diffstat (limited to 'test/files/run/t2544.scala')
-rw-r--r-- | test/files/run/t2544.scala | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/files/run/t2544.scala b/test/files/run/t2544.scala index 7e7cfeb357..6bee2f1082 100644 --- a/test/files/run/t2544.scala +++ b/test/files/run/t2544.scala @@ -1,19 +1,25 @@ object Test { object Foo extends Seq[Int] { def apply(i: Int) = i - def length = 4 + def length = 5 def iterator = Iterator(0,1,2,3,4) } + def lengthEquiv(result: Int) = println( + if (result < 0) -1 + else if (result == 0) 0 + else 1 + ) + def main(args: Array[String]) = { println(Foo indexWhere(_ >= 2,1)) println(Foo.toList indexWhere(_ >= 2,1)) println(Foo segmentLength(_ <= 3,1)) println(Foo.toList segmentLength(_ <= 3,1)) - println(Foo lengthCompare 7) - println(Foo.toList lengthCompare 7) - println(Foo lengthCompare 2) - println(Foo.toList lengthCompare 2) - println(Foo lengthCompare 5) - println(Foo.toList lengthCompare 5) + lengthEquiv(Foo lengthCompare 7) + lengthEquiv(Foo.toList lengthCompare 7) + lengthEquiv(Foo lengthCompare 2) + lengthEquiv(Foo.toList lengthCompare 2) + lengthEquiv(Foo lengthCompare 5) + lengthEquiv(Foo.toList lengthCompare 5) } -}
\ No newline at end of file +} |