File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -1149,6 +1149,7 @@ class Definitions {
11491149 " reactor.util.annotation.NonNullApi" ::
11501150 " io.reactivex.annotations.NonNull" :: Nil )
11511151
1152+
11521153 // convenient one-parameter method types
11531154 def methOfAny (tp : Type ): MethodType = MethodType (List (AnyType ), tp)
11541155 def methOfAnyVal (tp : Type ): MethodType = MethodType (List (AnyValType ), tp)
Original file line number Diff line number Diff line change @@ -25,12 +25,13 @@ import language.experimental.captureChecking
2525*/
2626@ java.lang.FunctionalInterface
2727abstract class Conversion [- T , + U ] extends Function1 [T , U ]:
28- /** Convert value `x` of type `T` to type `U` */
29- def apply (x : T ): U
28+ self =>
29+ /** Convert value `x` of type `T` to type `U` */
30+ def apply (x : T ): U
3031
31- extension (x : T )
32- /** `x.convert` converts a value `x` of type `T` to type `U` */
33- def convert = this (x)
32+ extension (x : T )
33+ /** `x.convert` converts a value `x` of type `T` to type `U` */
34+ def convert = this (x)
3435
3536object Conversion :
3637 import annotation .experimental
@@ -46,5 +47,4 @@ object Conversion:
4647 /** Unwrap an `into` */
4748 extension [T ](x : into[T ])
4849 @ experimental def underlying : T = x
49-
50- end Conversion
50+ end Conversion
You can’t perform that action at this time.
0 commit comments