the macrocosm is contracting

85 views
Skip to first unread message

Paul Phillips

unread,
Oct 20, 2012, 7:18:44 PM10/20/12
to Eugene Burmako, scala-i...@googlegroups.com, Jason Zaugg
As of M7, macrocosm's (https://github.com/retronym/macrocosm)'s last test:

case class Thing[A](a: A, b: Int)
val thingA = lens[Thing[String]].a
println(thingA._1(new Thing("foo", 1))) // foo
println(thingA._2(new Thing("foo", 1), "bar")) // Thing("bar")

Would print

foo
Thing(bar,1)

As of RC1, it no longer compiles:

[error] /r/macrocosm/src/test/scala/com/github/retronym/macrocosm/MacrocosmTest.scala:39: value apply is not a member of Nothing
[error]   val thingA = lens[Thing[String]].a
[error]                ^
[error] one error found
[error] (macrocosm/test:compile) Compilation failed

Is this something we know about, understand, expect, enjoy, fear, loathe?

Eugene Burmako

unread,
Oct 21, 2012, 4:08:05 AM10/21/12
to scala-internals
Here's what tree ends up in the macro:

Macrocosm.lens[Nothing].selectDynamic("apply")

Note the `Nothing` part. I guess it's the dynamic translation, which
somehow loses the targ.

On Oct 21, 2:18 am, Paul Phillips <pa...@improving.org> wrote:
> As of M7, macrocosm's (https://github.com/retronym/macrocosm)'slast test:

Eugene Burmako

unread,
Oct 21, 2012, 5:06:52 AM10/21/12
to scala-internals
Looks like a bug in dynamic translation: https://issues.scala-lang.org/browse/SI-6551

Josh Suereth

unread,
Oct 21, 2012, 7:42:53 AM10/21/12
to scala-i...@googlegroups.com

So... yes we know about the issue.  Are we afraid, no.  Enjoy? No.  Loathe? A bit.

Reply all
Reply to author
Forward
0 new messages