Skip to content

Commit 1dcc26d

Browse files
committed
Implement review suggestions
1 parent 0933b9c commit 1dcc26d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docs/docs/reference/contextual/extension-methods.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ given listOps: extension [T](xs: List[T]) {
139139
}
140140

141141
given extension [T](xs: List[T])(given Ordering[T]) {
142-
def largest(n: Int) = xs.sort.takeRight(n)
142+
def largest(n: Int) = xs.sorted.takeRight(n)
143143
}
144144
```
145145
If a given extension is anonymous (as in the last clause), its name is synthesized from the name of the first defined extension method.
@@ -158,7 +158,7 @@ given listOps: AnyRef {
158158
}
159159
given given_largest_of_List_T: AnyRef {
160160
def [T](xs: List[T]) largest (given Ordering[T])(n: Int) =
161-
xs.sort.takeRight(n)
161+
xs.sorted.takeRight(n)
162162
}
163163
```
164164

library/src/scala/tasty/reflect/ImplicitsOps.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trait ImplicitsOps extends Core {
1010
internal.matchImplicitSearchSuccess(isr)
1111
}
1212

13-
given successOps: (self: ImplicitSearchSuccess) {
13+
given SuccessOps: (self: ImplicitSearchSuccess) {
1414
def tree(given ctx: Context): Term = internal.ImplicitSearchSuccess_tree(self)
1515
}
1616

@@ -19,7 +19,7 @@ trait ImplicitsOps extends Core {
1919
internal.matchImplicitSearchFailure(isr)
2020
}
2121

22-
given failureOps: (self: ImplicitSearchFailure) {
22+
given FailureOps: (self: ImplicitSearchFailure) {
2323
def explanation(given ctx: Context): String = internal.ImplicitSearchFailure_explanation(self)
2424
}
2525

0 commit comments

Comments
 (0)