File tree 3 files changed +6
-6
lines changed 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
object Test {
2
2
extension StrDeco on (tree : String ) {
3
- def show (given DummyImplicit ): String = ???
4
- def show (color : Boolean )(given DummyImplicit ): String = ???
3
+ def show (using DummyImplicit ): String = ???
4
+ def show (color : Boolean )(using DummyImplicit ): String = ???
5
5
}
6
6
7
7
val a : String = " foo" .show
Original file line number Diff line number Diff line change 1
1
class Foo {
2
- def f (x : String )(given DummyImplicit ): String = x * 2
3
- def f (x : String )(color : Boolean )(given DummyImplicit ): String = x * 3
2
+ def f (x : String )(using DummyImplicit ): String = x * 2
3
+ def f (x : String )(color : Boolean )(using DummyImplicit ): String = x * 3
4
4
}
5
5
6
6
@ main def Test = println(new Foo ().f(" foo" ))
Original file line number Diff line number Diff line change 1
1
class Foo {
2
- def f (x : String )(given DummyImplicit ): String = x * 2
3
- def f (x : String )(given DummyImplicit )(color : Boolean ): String = x * 3
2
+ def f (x : String )(using DummyImplicit ): String = x * 2
3
+ def f (x : String )(using DummyImplicit )(color : Boolean ): String = x * 3
4
4
}
5
5
6
6
@ main def Test = println(new Foo ().f(" foo" ))
You can’t perform that action at this time.
0 commit comments