File tree 3 files changed +8
-9
lines changed 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ import dotty.tools.dotc.transform.MegaPhase
11
11
import ast .tpd ._
12
12
import scala .language .implicitConversions
13
13
import printing .Formatting ._
14
- import dotty .util .WrappedResult
15
14
16
15
/** This object provides useful implicit decorators for types defined elsewhere */
17
16
object Decorators {
Original file line number Diff line number Diff line change @@ -24,5 +24,12 @@ package object tools {
24
24
def unsupported (methodName : String ): Nothing =
25
25
throw new UnsupportedOperationException (methodName)
26
26
27
- export util .WrappedResult .{WrappedResult , result }
27
+ object resultWrapper {
28
+ opaque type WrappedResult [T ] = T
29
+ private [tools] def unwrap [T ](x : WrappedResult [T ]): T = x
30
+ private [tools] def wrap [T ](x : T ): WrappedResult [T ] = x
31
+ }
32
+ type WrappedResult [T ] = resultWrapper.WrappedResult [T ]
33
+ def WrappedResult [T ](x : T ) = resultWrapper.wrap(x)
34
+ def result [T ] given (x : WrappedResult [T ]): T = resultWrapper.unwrap(x)
28
35
}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments