This is totally unsound, regardless of how erasure is encoded.
@ toName("Frodo"): NameTag
java.lang.ClassCastException: java.base/java.lang.String cannot be cast to ammonite.$sess.cmd0$NameTag
ammonite.$sess.cmd5$.<clinit>(cmd5.sc:1)
I also don’t know what you’re trying to show. As @smarter says, the same can be done (soundly) with opaque types today. I think the main problem raised by the community is that this is already too much boilerplate.