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

PPrint derivation fails with nested class definitions #47

alexarchambault opened this Issue Apr 13, 2015 · 2 comments


None yet
2 participants

alexarchambault commented Apr 13, 2015

REPL session with Ammonite 0.2.7:

@ object ODef { case class Foo(i: Int, s: String) }
defined object ODef
@ ODef.Foo(2, "ba") // Nested in object, succeeds
res1: cmd0.ODef.Foo = Foo(2, "ba")

@ class CDef { case class Foo(i: Int, s: String) }
defined class CDef
@ object CDef extends CDef
defined object CDef
@ CDef.Foo(2, "ba") // Nested in class implemented by object, fails
Compilation Failed
Main.scala:26: could not find implicit value for evidence parameter of type ammonite.pprint.PPrint[cmd3.CDef.Foo]
          def $main() = {Iterator(, "res4")) ++ Iterator(" = ") ++ ammonite.pprint.PPrint(res4)}

This can be reproduced out of the Ammonite REPL, see

Note that contrary to Ammonite macros, shapeless Generic succeeds in these two cases (in the gist too).


This comment has been minimized.


lihaoyi commented Apr 18, 2015

Fixed by c57eedd

@lihaoyi lihaoyi closed this Apr 18, 2015


This comment has been minimized.


alexarchambault commented Apr 18, 2015

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment