summaryrefslogtreecommitdiff
path: root/test/files/run/sammy_cbn.scala
Commit message (Collapse)AuthorAgeFilesLines
* Keep Function when CBN arg thunk targets a SAMAdriaan Moors2016-03-301-0/+9
The body of `def delay[T](v: => T) = (v _): F0[T]` becomes `() => v` during `typedEta`, and then uncurry considers whether to strip the function wrapper since `v` is known to be a `Function0` thunk. Stripping is sound when the expected type is `Function0` for this expression, but that's no longer a given, since we could be expecting any nullary SAM. Also sweep up a bit around `typedEta`. Encapsulate the, erm, creative encoding of `m _` as `Typed(m, Function(Nil, EmptyTree))`.