diff --git a/spray-json/jvm/src/test/scala/spray/json/JsonParserSpecJvm.scala b/spray-json/jvm/src/test/scala/spray/json/JsonParserSpecJvm.scala index df83670..32097bc 100644 --- a/spray-json/jvm/src/test/scala/spray/json/JsonParserSpecJvm.scala +++ b/spray-json/jvm/src/test/scala/spray/json/JsonParserSpecJvm.scala @@ -60,7 +60,9 @@ class JsonParserSpecJvm extends Specification { queue.peek } - val i: Int = Iterator.iterate(1)(1.+).indexWhere(depth => probe(depth, maxDepth = 1000) contains "stackoverflow") + // Explicit type needed to compile on Scala 2.10, can be inlined later + def inc(i: Int): Int = 1 + i + val i: Int = Iterator.iterate(1)(inc).indexWhere(depth => probe(depth, maxDepth = 1000) contains "stackoverflow") println(s"Overflowing stack at $i which means we need about ${stackSize / i} bytes per recursive call") val maxDepth = i / 4 // should give lots of room