Created
February 4, 2014 18:27
-
-
Save paulp/8809412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.codecommit.gll._ | |
import org.specs2.ScalaCheck | |
import org.specs2.mutable._ | |
trait Foo extends Specification with Parsers with ScalaCheck { | |
check { (left: String, right: String) => | |
// import java.lang.String | |
if (false) | |
null == null | |
else | |
(left | right).first eq "" | |
} | |
} | |
// Without the import: compiles | |
// | |
// With the import: | |
// error: type mismatch; | |
// found : => Any | |
// required: AnyRef | |
// Note that <byname> extends Any, not AnyRef. | |
// Such types can participate in value classes, but instances | |
// cannot appear in singleton types or in reference comparisons. | |
// one error found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment