File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -154,12 +154,12 @@ object Annotations {
154
154
155
155
/** A deferred annotation to the result of a given child computation */
156
156
def later (delayedSym : (given Context ) => Symbol , span : Span )(implicit ctx : Context ): Annotation = {
157
- def makeChildLater (implicit ctx : Context ) = {
157
+ def makeChildLater (given ctx : Context ) = {
158
158
val sym = delayedSym
159
159
New (defn.ChildAnnot .typeRef.appliedTo(sym.owner.thisType.select(sym.name, sym)), Nil )
160
160
.withSpan(span)
161
161
}
162
- deferred(defn.ChildAnnot )(makeChildLater(ctx) )
162
+ deferred(defn.ChildAnnot )(makeChildLater)
163
163
}
164
164
165
165
/** A regular, non-deferred Child annotation */
Original file line number Diff line number Diff line change
1
+ scala> val list = List(1, 2, 3)
2
+ val list: List[Int] = List(1, 2, 3)
3
+ scala> list.foldLeft(List.empty[Int]){ case (acc, n) => n :: acc }
4
+ val res0: List[Int] = List(3, 2, 1)
You can’t perform that action at this time.
0 commit comments