The compiler verification on AFilter construction isn't sufficient.  2.10.0
and earlier didn't complain and happily assumed T => T.  2.10.1+ does
complain.  See https://issues.scala-lang.org/browse/SI-5189 .  The cast is
basically restoring the pre-2.10.1 behavior (which is wrong, but mostly
good enough).


On Fri, Dec 20, 2013 at 3:17 PM, Antonio Salazar Cardozo <
notifications@github.com> wrote:

> In web/webkit/src/main/scala/net/liftweb/http/LiftScreen.scala:
>
> > @@ -360,7 +360,7 @@ trait AbstractScreen extends Factory {
> >          case AVal(v: (T => List[FieldError])) => v
> >        },
> >        stuff.toList.collect {
> > -        case AFilter(v) => v
> > +        case AFilter(v) => v.asInstanceOf[T => T]
>
> I'm down for the isInstanceOf check, though it's worth mentioning that
> AFilter should already be providing a compiler check for the type. I
> think the only real concern here is reflection or something similarly weird
> that would ignore the compiler and run in a type-erased context could
> theoretically send in something other than what's expected.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/lift/framework/pull/1509/files#r8500039>
> .
>