pniederw/expecty

Options does not compile

arkadiuszbicz opened this issue · 6 comments

val expect = new Expecty()

expect {
Some(23) == Some(22)
}

Cause error

error: inferred type arguments [scala.type] do not conform to method recordValue's type parameter bounds [U]
expect {

Works for me. Which Scala version are you using?

I am using 2.10.3 I will check with 2.10.2.
On Nov 11, 2013 7:01 PM, "Peter Niederwieser" notifications@github.com
wrote:

Works for me. Which Scala version are you using?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28223452
.

Also works for me with 2.10.3. Is your actual expectation more complicated than what you showed above? In which environment are you using Expecty?

I am using it in ubuntu java 1.7 and repl
On Nov 11, 2013 7:31 PM, "Peter Niederwieser" notifications@github.com
wrote:

Also works for me with 2.10.3. Is your actual expectation more complicated
than what you showed above? In which environment are you using Expecty?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28225678
.

Can you try the same outside the REPL, perhaps with a main class?

Tested using scalac:

ExpectyTest.scala
import org.expecty.Expecty

object ExpectyTest extends App {

val expect = new Expecty()

expect {
Some(23) == Some(22)
}
}

Result:

scalac ExpectyTest.scala -classpath
/home/abicz/.ivy2/cache/org.expecty/expecty/jars/expecty-0.9.jar
ExpectyTest.scala:7: error: inferred type arguments [scala.type] do not
conform to method recordValue's type parameter bounds [U]
expect {
^
one error found

scalac -version
Scala compiler version 2.10.3 -- Copyright 2002-2013, LAMP/EPFL
java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

On Tue, Nov 12, 2013 at 11:04 AM, Peter Niederwieser <
notifications@github.com> wrote:

Can you try the same outside the REPL, perhaps with a main class?


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28281301
.