On Fri, May 1, 2009 at 10:57 PM, Vassil Dichev <[email protected]> wrote:
> > try:
> > if (true) msg.replyTo(1L)
>
> Doesn't work, same error. What does work is either:
>
> if (true) {msg.replyTo(1L); None}
That's weird because the return type of an if w/o else is always Unit.
You may have a little trouble simulating this without Lift as the input type
to replyTo (the thing that the type inferencer seems to be cranky about) is
a view bounds and then the subclass is Long (superclass trait Thing[Owner <:
Mapper[Owner], T]{ def apply[U <% T]: Owner = ... }
ReplyToThing[MappedMessage, Long]{ ... })
Also, this may be fixed in 2.7.4. Once we get Lift 1.1M1 out the door this
weekend, we're going to turn to doing a maintenance release of 1.0 by
upgrading to 2.7.4 and patching a few bugs (e.g., there are textile parsing
bugs.) This issue may be fixed in 2.7.4.
Thanks,
David
>
>
> or
>
> if (true) msg.replyTo(1L)
> else msg.replyTo(2L)
>
> So the bug must be related to figuring out the return value of the if
> statement. I'll try and simulate this without a dependency on Lift.
>
--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp