Skip to content

Commit 44f7575

Browse files
committed
Drop given as in tests
1 parent 6b73bbd commit 44f7575

File tree

33 files changed

+540
-540
lines changed

33 files changed

+540
-540
lines changed

compiler/src/dotty/tools/dotc/ast/MainProxies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import ast.Trees._
2626
*/
2727
object MainProxies {
2828

29-
def mainProxies(stats: List[tpd.Tree]) given Context: List[untpd.Tree] = {
29+
def mainProxies(stats: List[tpd.Tree])(given Context): List[untpd.Tree] = {
3030
import tpd._
3131
def mainMethods(stats: List[Tree]): List[Symbol] = stats.flatMap {
3232
case stat: DefDef if stat.symbol.hasAnnotation(defn.MainAnnot) =>

compiler/src/dotty/tools/dotc/core/Annotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import util.Spans.Span
1010

1111
object Annotations {
1212

13-
def annotClass(tree: Tree) given Context =
13+
def annotClass(tree: Tree)(given Context) =
1414
if (tree.symbol.isConstructor) tree.symbol.owner
1515
else tree.tpe.typeSymbol
1616

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ class Definitions {
403403

404404
@tu lazy val CollectionSeqType: TypeRef = ctx.requiredClassRef("scala.collection.Seq")
405405
@tu lazy val SeqType: TypeRef = ctx.requiredClassRef("scala.collection.immutable.Seq")
406-
def SeqClass given Context: ClassSymbol = SeqType.symbol.asClass
406+
def SeqClass(given Context): ClassSymbol = SeqType.symbol.asClass
407407
@tu lazy val Seq_apply : Symbol = SeqClass.requiredMethod(nme.apply)
408408
@tu lazy val Seq_head : Symbol = SeqClass.requiredMethod(nme.head)
409409
@tu lazy val Seq_drop : Symbol = SeqClass.requiredMethod(nme.drop)
@@ -412,7 +412,7 @@ class Definitions {
412412
@tu lazy val Seq_toSeq : Symbol = SeqClass.requiredMethod(nme.toSeq)
413413

414414
@tu lazy val ArrayType: TypeRef = ctx.requiredClassRef("scala.Array")
415-
def ArrayClass given Context: ClassSymbol = ArrayType.symbol.asClass
415+
def ArrayClass(given Context): ClassSymbol = ArrayType.symbol.asClass
416416
@tu lazy val Array_apply : Symbol = ArrayClass.requiredMethod(nme.apply)
417417
@tu lazy val Array_update : Symbol = ArrayClass.requiredMethod(nme.update)
418418
@tu lazy val Array_length : Symbol = ArrayClass.requiredMethod(nme.length)
@@ -422,10 +422,10 @@ class Definitions {
422422
@tu lazy val ArrayModule: Symbol = ctx.requiredModule("scala.Array")
423423

424424
@tu lazy val UnitType: TypeRef = valueTypeRef("scala.Unit", java.lang.Void.TYPE, UnitEnc, nme.specializedTypeNames.Void)
425-
def UnitClass given Context: ClassSymbol = UnitType.symbol.asClass
426-
def UnitModuleClass given Context: Symbol = UnitType.symbol.asClass.linkedClass
425+
def UnitClass(given Context): ClassSymbol = UnitType.symbol.asClass
426+
def UnitModuleClass(given Context): Symbol = UnitType.symbol.asClass.linkedClass
427427
@tu lazy val BooleanType: TypeRef = valueTypeRef("scala.Boolean", java.lang.Boolean.TYPE, BooleanEnc, nme.specializedTypeNames.Boolean)
428-
def BooleanClass given Context: ClassSymbol = BooleanType.symbol.asClass
428+
def BooleanClass(given Context): ClassSymbol = BooleanType.symbol.asClass
429429
@tu lazy val Boolean_! : Symbol = BooleanClass.requiredMethod(nme.UNARY_!)
430430
@tu lazy val Boolean_&& : Symbol = BooleanClass.requiredMethod(nme.ZAND) // ### harmonize required... calls
431431
@tu lazy val Boolean_|| : Symbol = BooleanClass.requiredMethod(nme.ZOR)
@@ -441,13 +441,13 @@ class Definitions {
441441
}).symbol
442442

443443
@tu lazy val ByteType: TypeRef = valueTypeRef("scala.Byte", java.lang.Byte.TYPE, ByteEnc, nme.specializedTypeNames.Byte)
444-
def ByteClass given Context: ClassSymbol = ByteType.symbol.asClass
444+
def ByteClass(given Context): ClassSymbol = ByteType.symbol.asClass
445445
@tu lazy val ShortType: TypeRef = valueTypeRef("scala.Short", java.lang.Short.TYPE, ShortEnc, nme.specializedTypeNames.Short)
446-
def ShortClass given Context: ClassSymbol = ShortType.symbol.asClass
446+
def ShortClass(given Context): ClassSymbol = ShortType.symbol.asClass
447447
@tu lazy val CharType: TypeRef = valueTypeRef("scala.Char", java.lang.Character.TYPE, CharEnc, nme.specializedTypeNames.Char)
448-
def CharClass given Context: ClassSymbol = CharType.symbol.asClass
448+
def CharClass(given Context): ClassSymbol = CharType.symbol.asClass
449449
@tu lazy val IntType: TypeRef = valueTypeRef("scala.Int", java.lang.Integer.TYPE, IntEnc, nme.specializedTypeNames.Int)
450-
def IntClass given Context: ClassSymbol = IntType.symbol.asClass
450+
def IntClass(given Context): ClassSymbol = IntType.symbol.asClass
451451
@tu lazy val Int_- : Symbol = IntClass.requiredMethod(nme.MINUS, List(IntType))
452452
@tu lazy val Int_+ : Symbol = IntClass.requiredMethod(nme.PLUS, List(IntType))
453453
@tu lazy val Int_/ : Symbol = IntClass.requiredMethod(nme.DIV, List(IntType))
@@ -456,18 +456,18 @@ class Definitions {
456456
@tu lazy val Int_>= : Symbol = IntClass.requiredMethod(nme.GE, List(IntType))
457457
@tu lazy val Int_<= : Symbol = IntClass.requiredMethod(nme.LE, List(IntType))
458458
@tu lazy val LongType: TypeRef = valueTypeRef("scala.Long", java.lang.Long.TYPE, LongEnc, nme.specializedTypeNames.Long)
459-
def LongClass given Context: ClassSymbol = LongType.symbol.asClass
459+
def LongClass(given Context): ClassSymbol = LongType.symbol.asClass
460460
@tu lazy val Long_+ : Symbol = LongClass.requiredMethod(nme.PLUS, List(LongType))
461461
@tu lazy val Long_* : Symbol = LongClass.requiredMethod(nme.MUL, List(LongType))
462462
@tu lazy val Long_/ : Symbol = LongClass.requiredMethod(nme.DIV, List(LongType))
463463

464464
@tu lazy val FloatType: TypeRef = valueTypeRef("scala.Float", java.lang.Float.TYPE, FloatEnc, nme.specializedTypeNames.Float)
465-
def FloatClass given Context: ClassSymbol = FloatType.symbol.asClass
465+
def FloatClass(given Context): ClassSymbol = FloatType.symbol.asClass
466466
@tu lazy val DoubleType: TypeRef = valueTypeRef("scala.Double", java.lang.Double.TYPE, DoubleEnc, nme.specializedTypeNames.Double)
467-
def DoubleClass given Context: ClassSymbol = DoubleType.symbol.asClass
467+
def DoubleClass(given Context): ClassSymbol = DoubleType.symbol.asClass
468468

469469
@tu lazy val BoxedUnitClass: ClassSymbol = ctx.requiredClass("scala.runtime.BoxedUnit")
470-
def BoxedUnit_UNIT given Context: TermSymbol = BoxedUnitClass.linkedClass.requiredValue("UNIT")
470+
def BoxedUnit_UNIT(given Context): TermSymbol = BoxedUnitClass.linkedClass.requiredValue("UNIT")
471471

472472
@tu lazy val BoxedBooleanClass: ClassSymbol = ctx.requiredClass("java.lang.Boolean")
473473
@tu lazy val BoxedByteClass : ClassSymbol = ctx.requiredClass("java.lang.Byte")
@@ -533,9 +533,9 @@ class Definitions {
533533
// in scalac modified to have Any as parent
534534

535535
@tu lazy val ThrowableType: TypeRef = ctx.requiredClassRef("java.lang.Throwable")
536-
def ThrowableClass given Context: ClassSymbol = ThrowableType.symbol.asClass
536+
def ThrowableClass(given Context): ClassSymbol = ThrowableType.symbol.asClass
537537
@tu lazy val SerializableType: TypeRef = JavaSerializableClass.typeRef
538-
def SerializableClass given Context: ClassSymbol = SerializableType.symbol.asClass
538+
def SerializableClass(given Context): ClassSymbol = SerializableType.symbol.asClass
539539

540540
@tu lazy val JavaEnumClass: ClassSymbol = {
541541
val cls = ctx.requiredClass("java.lang.Enum")

compiler/src/dotty/tools/dotc/quoted/QuoteContext.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import dotty.tools.dotc.tastyreflect.ReflectionImpl
55

66
object QuoteContext {
77

8-
def apply() given Context: scala.quoted.QuoteContext =
8+
def apply()(given Context): scala.quoted.QuoteContext =
99
new scala.quoted.QuoteContext(ReflectionImpl(the[Context]))
1010

1111
type ScopeId = Int
1212

13-
private[dotty] def checkScopeId(id: ScopeId) given Context: Unit =
13+
private[dotty] def checkScopeId(id: ScopeId)(given Context): Unit =
1414
if (id != scopeId)
1515
throw new scala.quoted.ScopeException("Cannot call `scala.quoted.staging.run(...)` within a macro or another `run(...)`")
1616

1717
// TODO Explore more fine grained scope ids.
1818
// This id can only differentiate scope extrusion from one compiler instance to another.
19-
private[dotty] def scopeId given Context: ScopeId =
19+
private[dotty] def scopeId(given Context): ScopeId =
2020
the[Context].outersIterator.toList.last.hashCode()
2121
}

0 commit comments

Comments
 (0)