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 @@ -1148,6 +1148,7 @@ class Definitions {
11481148 " reactor.util.annotation.NonNullApi" ::
11491149 " io.reactivex.annotations.NonNull" :: Nil )
11501150
1151+
11511152 // convenient one-parameter method types
11521153 def methOfAny (tp : Type ): MethodType = MethodType (List (AnyType ), tp)
11531154 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