Closed GoogleCodeExporter closed 9 years ago
Hi,
Which version of specs are you using?
I could not reproduce the NoSuchElementException with any of 1.6.2 (scala
2.7.7) or
with 1.6.3 (scala 2.8.0)
On the other hand I can tell you that the compilation error is due to the
import of
the Sugar object implicits. In that object there is a function to transform all
tuples to a list, including a single element. This conflicts here with the
identity
method in Predef. If you remove that you should have to call toList on the
NodeSeq.
Original comment by etorrebo...@gmail.com
on 8 Feb 2010 at 12:20
Hm. I figured that the compilation error was due to something similar. I'm
obviously a
slight bit of a newb to Scala, but isn't it smart enough to figure out that
haveSize(2) is a
method call, rather than the creation of a tuple? Silly question, of course:
obviously, it
isn't :-P
I'm running specs 1.6.2 with scala 2.7.7. This wouldn't have anything to do
with running
through sbt, would it?
Original comment by savedfas...@gmail.com
on 8 Feb 2010 at 3:43
Further analysis on the NoSuchElementException shows that you've been bitten
(my
fault certainly) by implicits.
Since there is a method in the Sugar object to convert anything to a List. If I
write:
val x = Group(<test></test><secondtest></secondtest>) must have
then x is of type org.specs.specification.Result[Group] and converted to a
List, it
has a size method. Which returns an Integer, which is converted to a list of
one
element again, and then fails when trying to get the element at position 2.
I fixed the issue anyway and the fix is available in specs-1.6.2.1-SNAPSHOT:
http://nexus-direct.scala-tools.org/content/repositories/snapshots/org/scala-
tools/testing/specs/1.6.2.1-SNAPSHOT/specs-1.6.2.1-SNAPSHOT.jar.
Original comment by etorrebo...@gmail.com
on 10 Feb 2010 at 1:51
Wow, complicated hehe.
So wait, what eventually helped to reproduce it?
Original comment by savedfas...@gmail.com
on 10 Feb 2010 at 4:48
Original comment by etorrebo...@gmail.com
on 26 May 2010 at 10:26
Original issue reported on code.google.com by
savedfas...@gmail.com
on 7 Feb 2010 at 3:55Attachments: