Here's some code that generates a red squiggle in the IDE, but works fine in e.g. sbt console. I'm using 2.11.5 and scodec 1.7.0-RC1.
I have no idea where to start looking, but I'm happy to provide extra info. Thanks!
import scodec._
import scodec.codecs.implicits._
val hrm = Codec.encode(123)
I have no idea where to start looking, but I'm happy to provide extra info. Thanks!
Leave a comment
on 2015-01-25 10:07 *
By Simon Schäfer
What is the error message you can see?
on 2015-01-25 11:31 *
By alan.m.odonnell
exception during macro expansion: java.util.NoSuchElementException: head of empty list at scala.collection.immutable.Nil$.head(List.scala:420) at scala.collection.immutable.Nil$.head(List.scala:417) at shapeless.LazyMacros.mkLazyImpl(lazy.scala:55) at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers$$anonfun$resolveJavaReflectionRuntime$2.apply(JavaReflectionRuntimes.scala:34) at scala.reflect.macros.runtime.JavaReflectionRuntimes$JavaReflectionResolvers$$anonfun$resolveJavaReflectionRuntime$2.apply(JavaReflectionRuntimes.scala:22) at scala.tools.nsc.typechecker.Macros$class.macroExpandWithRuntime(Macros.scala:755)
on 2015-01-25 11:37 *
By alan.m.odonnell
From talking with Miles Sabin on the scodec gitter channel: https://gitter.im/scodec/scodec
"The exception in the shapeless macro is due to an implicit macro being invoked as if explicitly rather than implicitly by the presentation compiler. I can fix the exception throw, but the calling context for the macro is still wrong, so the presentation compiler will continue to register an error even though there should not be one."
"The exception in the shapeless macro is due to an implicit macro being invoked as if explicitly rather than implicitly by the presentation compiler. I can fix the exception throw, but the calling context for the macro is still wrong, so the presentation compiler will continue to register an error even though there should not be one."
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|