Skip to content

Commit fdf7cdc

Browse files
committed
bugfix: Adjust givens to old syntax
1 parent 86169a8 commit fdf7cdc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/warn/i15503f.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ package givens:
5757
trait Y:
5858
def doY: String
5959

60-
given X:
60+
given X with
6161
def doX = 7
6262

63-
given X => Y: // warn protected param to given class
63+
given (using X): Y with // warn protected param to given class
6464
def doY = "7"
6565
/* desugared. It is protected so that its type can be used in member defs without leaking.
6666
* possibly it should be protected only for named parameters.
@@ -72,6 +72,6 @@ package givens:
7272
new givens.given_Y(using x$1)()
7373
*/
7474

75-
given namely: (x: X) => Y: // warn protected param to given class
75+
given namely (using x: X): Y with // warn protected param to given class
7676
def doY = "8"
7777
end givens

0 commit comments

Comments
 (0)