New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when showing Enums (such as java.util.concurrent.TimeUnit.DAYS) #186

Closed
nkvoll opened this Issue Aug 21, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@nkvoll

nkvoll commented Aug 21, 2015

This one is easy to reproduce, just ask Ammonite to show java.util.concurrent.TimeUnit.DAYS:

@ java.util.concurrent.TimeUnit.DAYS
Compilation Failed
Main.scala:303: exception during macro expansion:
scala.ScalaReflectionException: value NANOSECONDS is not a type
    at scala.reflect.api.Symbols$SymbolApi$class.asType(Symbols.scala:183)
    at scala.reflect.internal.Symbols$SymbolContextApiImpl.asType(Symbols.scala:84)
    at derive.Derive$$anonfun$impl$1$2.apply(Derive.scala:75)
    at derive.Derive$$anonfun$impl$1$2.apply(Derive.scala:74)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
    at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:245)
    at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:322)
    at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:978)
    at scala.collection.TraversableLike$class.map(TraversableLike.scala:245)
    at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:47)
    at scala.collection.SetLike$class.map(SetLike.scala:92)
    at scala.collection.AbstractSet.map(Set.scala:47)
    at derive.Derive.impl$1(Derive.scala:74)
    at derive.Derive.fleshedOutSubtypes(Derive.scala:81)
    at derive.Derive.derive$Derive$$onFail$1(Derive.scala:136)
    at derive.Derive$$anonfun$derive$Derive$$rec$1$1.apply(Derive.scala:204)
    at derive.Derive$$anonfun$derive$Derive$$rec$1$1.apply(Derive.scala:178)
    at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
    at scala.collection.mutable.AbstractMap.getOrElseUpdate(Map.scala:80)
    at derive.Derive.derive$Derive$$rec$1(Derive.scala:178)
    at derive.Derive.deriveType(Derive.scala:217)
    at derive.Derive.derive(Derive.scala:58)
    at pprint.Internals$LowerPriPPrint$.liftedTree1$1(PPrint.scala:398)
    at pprint.Internals$LowerPriPPrint$.FinalRepr(PPrint.scala:398)

        def $main() = { ammonite.repl.frontend.ReplBridge.repl.Internal.combinePrints(ammonite.repl.frontend.ReplBridge.repl.Internal.print(res12, res12, "res12", None)) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment