Created
August 5, 2014 09:47
-
-
Save dragos/c43590e4c764d4a24f17 to your computer and use it in GitHub Desktop.
Shapeless PC bug.
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
// build.sbt | |
resolvers ++= Seq( | |
Resolver.sonatypeRepo("releases"), | |
Resolver.sonatypeRepo("snapshots") | |
) | |
// For Scala 2.11.0 | |
scalaVersion := "2.11.0" | |
libraryDependencies ++= Seq( | |
"com.chuusai" %% "shapeless" % "2.0.0" | |
) | |
// src/main/scala/test/ShapelessTest.scala | |
package test | |
import shapeless._ ; import syntax.singleton._ ; import record._ | |
object ShapelessTest { | |
val book = | |
("author" ->> "Benjamin Pierce") :: HNil | |
} | |
// to reproduce, run the following session: | |
scala scala.tools.nsc.interactive.REPL -cp /Users/dragos/.ivy2/cache/com.chuusai/shapeless_2.11/bundles/shapeless_2.11-2.0.0.jar | |
> help | |
Available commands: | |
reload <file_1> ... <file_n> | |
reloadAndAskType <file> <sleep-ms> | |
typed <file> | |
typeat <file> <start-pos> <end-pos> | |
typeat <file> <pos> | |
complete <file> <start-pos> <end-pos> | |
compile <file> <pos> | |
structure <file> | |
quit | |
> reload src/main/scala/test/ShapelessTest.scala | |
==> () | |
> src/main/scala/test/ShapelessTest.scala:7: error: type mismatch; | |
found : fresh$macro$4 | |
required: fresh$macro$2 | |
("author" ->> "Benjamin Pierce") :: HNil | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment