Skip to content

Commit 041b2bb

Browse files
committed
Change remaining uses of given to using
1 parent a18bc9e commit 041b2bb

File tree

365 files changed

+762
-762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+762
-762
lines changed

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
244244
case _ => toTextGlobal(args, ", ")
245245
}
246246
"[applied to ("
247-
~ keywordText("given ").provided(tp.isContextualMethod)
247+
~ keywordText("using ").provided(tp.isContextualMethod)
248248
~ keywordText("erased ").provided(tp.isErasedMethod)
249249
~ argsText
250250
~ ") returning "

tests/generic-java-signatures/i3653.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Foo {
55
c0: T, c1: T, c2: T, c3: T, c4: T, c5: T, c6: T, c7: T, c8: T, c9: T) => 0
66

77
// #6946
8-
def baz = (x: String ?=> Unit) => x(given "")
8+
def baz = (x: String ?=> Unit) => x(using "")
99
}
1010

1111
object Test {

tests/neg-custom-args/erased/i2642.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object Foo {
2-
type X = (given) => Int // error: an identifier expected, but ')' found
2+
type X = (using ) => Int // error: an identifier expected, but ')' found
33
def ff: X = () // error: found: Unit, expected: Int
44

55
type Y = (erased) => Int // error: empty function may not be erased

tests/neg-custom-args/fatal-warnings/quote-simple-hole.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import scala.quoted.QuoteContext
22

3-
def test(given QuoteContext) = {
3+
def test(using QuoteContext) = {
44
val x = '{0}
55
val y = '{ // error: Canceled splice directly inside a quote. '{ ${ XYZ } } is equivalent to XYZ.
66
$x

tests/neg-macros/GenericNumLits/Even_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object Even {
1111
else throw FromDigits.MalformedNumber(s"$digits is odd")
1212
}
1313

14-
private def evenFromDigitsImpl(digits: Expr[String])(given ctx: QuoteContext): Expr[Even] = digits match {
14+
private def evenFromDigitsImpl(digits: Expr[String])(using ctx: QuoteContext): Expr[Even] = digits match {
1515
case Const(ds) =>
1616
val ev =
1717
try evenFromDigits(ds)

tests/neg-macros/delegate-match-1/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import scala.quoted.matching._
33

44
inline def f: Any = ${ fImpl }
55

6-
private def fImpl (using qctx: QuoteContext) : Expr[Unit] = {
6+
private def fImpl(using qctx: QuoteContext): Expr[Unit] = {
77
import qctx.tasty.{_, given _}
88
searchImplicit(('[A]).unseal.tpe) match {
99
case x: ImplicitSearchSuccess =>

tests/neg-macros/i7142/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package macros
22
import scala.quoted._
33

4-
def oops(given QuoteContext) = {
4+
def oops(using QuoteContext) = {
55
var v = '{0};
66
val q = '{ (x: Int) => ${ v = '{x}; v } }
77
'{$q($v)}

tests/neg-macros/i7142b/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package macros
22
import scala.quoted._
33
import scala.util.control.NonLocalReturns._
44

5-
def oops(given QuoteContext): Expr[Int] =
5+
def oops(using QuoteContext): Expr[Int] =
66
returning('{ { (x: Int) => ${ throwReturn('x) }} apply 0 })
77

88
inline def test = ${oops}

tests/neg-macros/i7142c/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package macros
22
import scala.quoted._
33

4-
def oops(given QuoteContext) = {
4+
def oops(using QuoteContext) = {
55
var v = '{0};
66
val q = '{ val x: Int = 8; ${ v = '{x}; v } }
77
v

tests/neg-macros/i7142d/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package macros
22
import scala.quoted._
33

4-
def oops(given QuoteContext) = {
4+
def oops(using QuoteContext) = {
55
var v = '{0};
66
val q = '{ ??? match { case x => ${ v = '{x}; v } } }
77
v

0 commit comments

Comments
 (0)