File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Expand file tree Collapse file tree 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
1111import ast .tpd ._
1212import scala .language .implicitConversions
1313import printing .Formatting ._
14- import dotty .util .WrappedResult
1514
1615/** This object provides useful implicit decorators for types defined elsewhere */
1716object Decorators {
Original file line number Diff line number Diff line change @@ -24,5 +24,12 @@ package object tools {
2424 def unsupported (methodName : String ): Nothing =
2525 throw new UnsupportedOperationException (methodName)
2626
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)
2835}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments