Hi, I'm trying to compile the StackSpec example with scala 2.7.4 and scalatest 0.9.5 and I get the following error:
================ Information:Compilation completed with 1 error and 0 warnings Information:1 error Information:0 warnings /home/entzik/work/personal/scalaplay/collections/tests/com/thekirschne rs/scala/collections/StackSpec.scala Error:Error:line (8)error: class StackSpec needs to be abstract, since type _$8 in trait Matchers with bounds >: scala.this.Nothing <: scala.this.Any is not defined class StackSpec extends Spec with ShouldMatchers { ================
I'm compiling from idea using the scala suport plugin.
class StackSpec extends Spec with ShouldMatchers {
describe("A Stack") {
it("should pop values in last-in-first-out order") { val stack = new Stack[Int] stack.push(1) stack.push(2) stack.pop() should equal (2) stack.pop() should equal (1) }
it("should be empty when created") { val stack = new Stack[Int] stack should be ('empty) } } }
I guess it's a bug in the IDEA plugin since it compiles properly from command line. It's weird though, the library I want to test compiles just fine, and the small test application compiles and work as expected as well. Only scalatest test classes with matchers fail to compile....
> Hi, I fixed it. this was due to a classpath mess: some > older version of scala was laying around + a forgotten > symlink. > > now with the right setup everything works fine. > > thanks for looking into this and sorry for wasting your > time. > > e. No problem. No time wasted. This kind of thing seems to happen now and then when working with Scala unfortunately. Binary compatibility between Scala releases is not yet a feature to near the extent it is in Java.