@@ -1138,11 +1138,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1138
1138
case _ => None
1139
1139
}
1140
1140
1141
- def TypeBounds_apply (low : Type , hi : Type )( using Context ) : TypeBounds =
1141
+ def TypeBounds_apply (low : Type , hi : Type ): TypeBounds =
1142
1142
Types .TypeBounds (low, hi)
1143
1143
1144
- def TypeBounds_low (self : TypeBounds )( using Context ) : Type = self.lo
1145
- def TypeBounds_hi (self : TypeBounds )( using Context ) : Type = self.hi
1144
+ def TypeBounds_low (self : TypeBounds ): Type = self.lo
1145
+ def TypeBounds_hi (self : TypeBounds ): Type = self.hi
1146
1146
1147
1147
type Type = Types .Type
1148
1148
@@ -1154,7 +1154,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1154
1154
case _ => None
1155
1155
}
1156
1156
1157
- def Type_apply (clazz : Class [? ])( using Context ) : Type =
1157
+ def Type_apply (clazz : Class [? ]): Type =
1158
1158
if (clazz.isPrimitive)
1159
1159
if (clazz == classOf [Boolean ]) defn.BooleanType
1160
1160
else if (clazz == classOf [Byte ]) defn.ByteType
@@ -1176,54 +1176,54 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1176
1176
}
1177
1177
else getClassIfDefined(clazz.getCanonicalName).typeRef
1178
1178
1179
- def Type_isTypeEq (self : Type )(that : Type )( using Context ) : Boolean = self =:= that
1179
+ def Type_isTypeEq (self : Type )(that : Type ): Boolean = self =:= that
1180
1180
1181
- def Type_isSubType (self : Type )(that : Type )( using Context ) : Boolean = self <:< that
1181
+ def Type_isSubType (self : Type )(that : Type ): Boolean = self <:< that
1182
1182
1183
- def Type_widen (self : Type )( using Context ) : Type = self.widen
1183
+ def Type_widen (self : Type ): Type = self.widen
1184
1184
1185
- def Type_widenTermRefExpr (self : Type )( using Context ) : Type = self.widenTermRefExpr
1185
+ def Type_widenTermRefExpr (self : Type ): Type = self.widenTermRefExpr
1186
1186
1187
- def Type_dealias (self : Type )( using Context ) : Type = self.dealias
1187
+ def Type_dealias (self : Type ): Type = self.dealias
1188
1188
1189
- def Type_simplified (self : Type )( using Context ) : Type = self.simplified
1189
+ def Type_simplified (self : Type ): Type = self.simplified
1190
1190
1191
- def Type_classSymbol (self : Type )( using Context ) : Option [Symbol ] =
1191
+ def Type_classSymbol (self : Type ): Option [Symbol ] =
1192
1192
if (self.classSymbol.exists) Some (self.classSymbol.asClass) else None
1193
1193
1194
- def Type_typeSymbol (self : Type )( using Context ) : Symbol = self.typeSymbol
1194
+ def Type_typeSymbol (self : Type ): Symbol = self.typeSymbol
1195
1195
1196
- def Type_termSymbol (self : Type )( using Context ) : Symbol = self.termSymbol
1196
+ def Type_termSymbol (self : Type ): Symbol = self.termSymbol
1197
1197
1198
- def Type_isSingleton (self : Type )( using Context ) : Boolean = self.isSingleton
1198
+ def Type_isSingleton (self : Type ): Boolean = self.isSingleton
1199
1199
1200
- def Type_memberType (self : Type )(member : Symbol )( using Context ) : Type =
1200
+ def Type_memberType (self : Type )(member : Symbol ): Type =
1201
1201
member.info.asSeenFrom(self, member.owner)
1202
1202
1203
- def Type_baseClasses (self : Type )( using Context ) : List [Symbol ] =
1203
+ def Type_baseClasses (self : Type ): List [Symbol ] =
1204
1204
self.baseClasses
1205
1205
1206
- def Type_baseType (self : Type )(cls : Symbol )( using Context ) : Type =
1206
+ def Type_baseType (self : Type )(cls : Symbol ): Type =
1207
1207
self.baseType(cls)
1208
1208
1209
- def Type_derivesFrom (self : Type )(cls : Symbol )( using Context ) : Boolean =
1209
+ def Type_derivesFrom (self : Type )(cls : Symbol ): Boolean =
1210
1210
self.derivesFrom(cls)
1211
1211
1212
- def Type_isFunctionType (self : Type )( using Context ) : Boolean =
1212
+ def Type_isFunctionType (self : Type ): Boolean =
1213
1213
defn.isFunctionType(self)
1214
1214
1215
- def Type_isContextFunctionType (self : Type )( using Context ) : Boolean =
1215
+ def Type_isContextFunctionType (self : Type ): Boolean =
1216
1216
defn.isContextFunctionType(self)
1217
1217
1218
- def Type_isErasedFunctionType (self : Type )( using Context ) : Boolean =
1218
+ def Type_isErasedFunctionType (self : Type ): Boolean =
1219
1219
defn.isErasedFunctionType(self)
1220
1220
1221
- def Type_isDependentFunctionType (self : Type )( using Context ) : Boolean = {
1221
+ def Type_isDependentFunctionType (self : Type ): Boolean = {
1222
1222
val tpNoRefinement = self.dropDependentRefinement
1223
1223
tpNoRefinement != self && defn.isNonRefinedFunction(tpNoRefinement)
1224
1224
}
1225
1225
1226
- def Type_select (self : Type )(sym : Symbol )( using Context ) : Type =
1226
+ def Type_select (self : Type )(sym : Symbol ): Type =
1227
1227
self.select(sym)
1228
1228
1229
1229
type ConstantType = Types .ConstantType
@@ -1235,10 +1235,10 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1235
1235
case _ => None
1236
1236
}
1237
1237
1238
- def ConstantType_apply (const : Constant )( using Context ) : ConstantType =
1238
+ def ConstantType_apply (const : Constant ): ConstantType =
1239
1239
Types .ConstantType (const)
1240
1240
1241
- def ConstantType_constant (self : ConstantType )( using Context ) : Constant = self.value
1241
+ def ConstantType_constant (self : ConstantType ): Constant = self.value
1242
1242
1243
1243
type TermRef = Types .NamedType
1244
1244
@@ -1249,12 +1249,12 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1249
1249
case _ => None
1250
1250
}
1251
1251
1252
- def TermRef_apply (qual : TypeOrBounds , name : String )( using Context ) : TermRef =
1252
+ def TermRef_apply (qual : TypeOrBounds , name : String ): TermRef =
1253
1253
Types .TermRef (qual, name.toTermName)
1254
1254
1255
- def TermRef_qualifier (self : TermRef )( using Context ) : TypeOrBounds = self.prefix
1255
+ def TermRef_qualifier (self : TermRef ): TypeOrBounds = self.prefix
1256
1256
1257
- def TermRef_name (self : TermRef )( using Context ) : String = self.name.toString
1257
+ def TermRef_name (self : TermRef ): String = self.name.toString
1258
1258
1259
1259
type TypeRef = Types .NamedType
1260
1260
@@ -1265,13 +1265,13 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1265
1265
case _ => None
1266
1266
}
1267
1267
1268
- def TypeRef_qualifier (self : TypeRef )( using Context ) : TypeOrBounds = self.prefix
1268
+ def TypeRef_qualifier (self : TypeRef ): TypeOrBounds = self.prefix
1269
1269
1270
- def TypeRef_name (self : TypeRef )( using Context ) : String = self.name.toString
1270
+ def TypeRef_name (self : TypeRef ): String = self.name.toString
1271
1271
1272
- def TypeRef_isOpaqueAlias (self : TypeRef )( using Context ) : Boolean = self.symbol.isOpaqueAlias
1272
+ def TypeRef_isOpaqueAlias (self : TypeRef ): Boolean = self.symbol.isOpaqueAlias
1273
1273
1274
- def TypeRef_translucentSuperType (self : TypeRef )( using Context ) : Type = self.translucentSuperType
1274
+ def TypeRef_translucentSuperType (self : TypeRef ): Type = self.translucentSuperType
1275
1275
1276
1276
type NamedTermRef = Types .NamedType
1277
1277
@@ -1286,8 +1286,8 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1286
1286
case _ => None
1287
1287
}
1288
1288
1289
- def NamedTermRef_name (self : NamedTermRef )( using Context ) : String = self.name.toString
1290
- def NamedTermRef_qualifier (self : NamedTermRef )( using Context ) : TypeOrBounds = self.prefix
1289
+ def NamedTermRef_name (self : NamedTermRef ): String = self.name.toString
1290
+ def NamedTermRef_qualifier (self : NamedTermRef ): TypeOrBounds = self.prefix
1291
1291
1292
1292
type SuperType = Types .SuperType
1293
1293
@@ -1298,11 +1298,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1298
1298
case _ => None
1299
1299
}
1300
1300
1301
- def SuperType_apply (thistpe : Type , supertpe : Type )( using Context ) : SuperType =
1301
+ def SuperType_apply (thistpe : Type , supertpe : Type ): SuperType =
1302
1302
Types .SuperType (thistpe, supertpe)
1303
1303
1304
- def SuperType_thistpe (self : SuperType )( using Context ) : Type = self.thistpe
1305
- def SuperType_supertpe (self : SuperType )( using Context ) : Type = self.supertpe
1304
+ def SuperType_thistpe (self : SuperType ): Type = self.thistpe
1305
+ def SuperType_supertpe (self : SuperType ): Type = self.supertpe
1306
1306
1307
1307
type Refinement = Types .RefinedType
1308
1308
@@ -1313,17 +1313,17 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1313
1313
case _ => None
1314
1314
}
1315
1315
1316
- def Refinement_apply (parent : Type , name : String , info : TypeOrBounds /* Type | TypeBounds */ )( using Context ) : Refinement = {
1316
+ def Refinement_apply (parent : Type , name : String , info : TypeOrBounds /* Type | TypeBounds */ ): Refinement = {
1317
1317
val name1 =
1318
1318
info match
1319
1319
case _ : TypeBounds => name.toTypeName
1320
1320
case _ => name.toTermName
1321
1321
Types .RefinedType (parent, name1, info)
1322
1322
}
1323
1323
1324
- def Refinement_parent (self : Refinement )( using Context ) : Type = self.parent
1325
- def Refinement_name (self : Refinement )( using Context ) : String = self.refinedName.toString
1326
- def Refinement_info (self : Refinement )( using Context ) : TypeOrBounds = self.refinedInfo
1324
+ def Refinement_parent (self : Refinement ): Type = self.parent
1325
+ def Refinement_name (self : Refinement ): String = self.refinedName.toString
1326
+ def Refinement_info (self : Refinement ): TypeOrBounds = self.refinedInfo
1327
1327
1328
1328
type AppliedType = Types .AppliedType
1329
1329
@@ -1334,10 +1334,10 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1334
1334
case _ => None
1335
1335
}
1336
1336
1337
- def AppliedType_tycon (self : AppliedType )( using Context ) : Type = self.tycon
1338
- def AppliedType_args (self : AppliedType )( using Context ) : List [TypeOrBounds ] = self.args
1337
+ def AppliedType_tycon (self : AppliedType ): Type = self.tycon
1338
+ def AppliedType_args (self : AppliedType ): List [TypeOrBounds ] = self.args
1339
1339
1340
- def AppliedType_apply (tycon : Type , args : List [TypeOrBounds ])( using Context ) : AppliedType = Types .AppliedType (tycon, args)
1340
+ def AppliedType_apply (tycon : Type , args : List [TypeOrBounds ]): AppliedType = Types .AppliedType (tycon, args)
1341
1341
1342
1342
type AnnotatedType = Types .AnnotatedType
1343
1343
@@ -1348,11 +1348,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1348
1348
case _ => None
1349
1349
}
1350
1350
1351
- def AnnotatedType_apply (underlying : Type , annot : Term )( using Context ) : AnnotatedType =
1351
+ def AnnotatedType_apply (underlying : Type , annot : Term ): AnnotatedType =
1352
1352
Types .AnnotatedType (underlying, Annotations .Annotation (annot))
1353
1353
1354
- def AnnotatedType_underlying (self : AnnotatedType )( using Context ) : Type = self.underlying.stripTypeVar
1355
- def AnnotatedType_annot (self : AnnotatedType )( using Context ) : Term = self.annot.tree
1354
+ def AnnotatedType_underlying (self : AnnotatedType ): Type = self.underlying.stripTypeVar
1355
+ def AnnotatedType_annot (self : AnnotatedType ): Term = self.annot.tree
1356
1356
1357
1357
type AndType = Types .AndType
1358
1358
@@ -1363,11 +1363,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1363
1363
case _ => None
1364
1364
}
1365
1365
1366
- def AndType_apply (lhs : Type , rhs : Type )( using Context ) : AndType =
1366
+ def AndType_apply (lhs : Type , rhs : Type ): AndType =
1367
1367
Types .AndType (lhs, rhs)
1368
1368
1369
- def AndType_left (self : AndType )( using Context ) : Type = self.tp1.stripTypeVar
1370
- def AndType_right (self : AndType )( using Context ) : Type = self.tp2.stripTypeVar
1369
+ def AndType_left (self : AndType ): Type = self.tp1.stripTypeVar
1370
+ def AndType_right (self : AndType ): Type = self.tp2.stripTypeVar
1371
1371
1372
1372
type OrType = Types .OrType
1373
1373
@@ -1378,11 +1378,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1378
1378
case _ => None
1379
1379
}
1380
1380
1381
- def OrType_apply (lhs : Type , rhs : Type )( using Context ) : OrType =
1381
+ def OrType_apply (lhs : Type , rhs : Type ): OrType =
1382
1382
Types .OrType (lhs, rhs)
1383
1383
1384
- def OrType_left (self : OrType )( using Context ) : Type = self.tp1.stripTypeVar
1385
- def OrType_right (self : OrType )( using Context ) : Type = self.tp2.stripTypeVar
1384
+ def OrType_left (self : OrType ): Type = self.tp1.stripTypeVar
1385
+ def OrType_right (self : OrType ): Type = self.tp2.stripTypeVar
1386
1386
1387
1387
type MatchType = Types .MatchType
1388
1388
@@ -1393,12 +1393,12 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1393
1393
case _ => None
1394
1394
}
1395
1395
1396
- def MatchType_apply (bound : Type , scrutinee : Type , cases : List [Type ])( using Context ) : MatchType =
1396
+ def MatchType_apply (bound : Type , scrutinee : Type , cases : List [Type ]): MatchType =
1397
1397
Types .MatchType (bound, scrutinee, cases)
1398
1398
1399
- def MatchType_bound (self : MatchType )( using Context ) : Type = self.bound
1400
- def MatchType_scrutinee (self : MatchType )( using Context ) : Type = self.scrutinee
1401
- def MatchType_cases (self : MatchType )( using Context ) : List [Type ] = self.cases
1399
+ def MatchType_bound (self : MatchType ): Type = self.bound
1400
+ def MatchType_scrutinee (self : MatchType ): Type = self.scrutinee
1401
+ def MatchType_cases (self : MatchType ): List [Type ] = self.cases
1402
1402
1403
1403
type ByNameType = Types .ExprType
1404
1404
@@ -1409,9 +1409,9 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1409
1409
case _ => None
1410
1410
}
1411
1411
1412
- def ByNameType_apply (underlying : Type )( using Context ) : Type = Types .ExprType (underlying)
1412
+ def ByNameType_apply (underlying : Type ): Type = Types .ExprType (underlying)
1413
1413
1414
- def ByNameType_underlying (self : ByNameType )( using Context ) : Type = self.resType.stripTypeVar
1414
+ def ByNameType_underlying (self : ByNameType ): Type = self.resType.stripTypeVar
1415
1415
1416
1416
type ParamRef = Types .ParamRef
1417
1417
@@ -1423,9 +1423,9 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1423
1423
case _ => None
1424
1424
}
1425
1425
1426
- def ParamRef_binder (self : ParamRef )( using Context ) : LambdaType [TypeOrBounds ] =
1426
+ def ParamRef_binder (self : ParamRef ): LambdaType [TypeOrBounds ] =
1427
1427
self.binder.asInstanceOf [LambdaType [TypeOrBounds ]] // Cast to tpd
1428
- def ParamRef_paramNum (self : ParamRef )( using Context ) : Int = self.paramNum
1428
+ def ParamRef_paramNum (self : ParamRef ): Int = self.paramNum
1429
1429
1430
1430
type ThisType = Types .ThisType
1431
1431
@@ -1436,7 +1436,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1436
1436
case _ => None
1437
1437
}
1438
1438
1439
- def ThisType_tref (self : ThisType )( using Context ) : Type = self.tref
1439
+ def ThisType_tref (self : ThisType ): Type = self.tref
1440
1440
1441
1441
type RecursiveThis = Types .RecThis
1442
1442
@@ -1447,7 +1447,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1447
1447
case _ => None
1448
1448
}
1449
1449
1450
- def RecursiveThis_binder (self : RecursiveThis )( using Context ) : RecursiveType = self.binder
1450
+ def RecursiveThis_binder (self : RecursiveThis ): RecursiveType = self.binder
1451
1451
1452
1452
type RecursiveType = Types .RecType
1453
1453
@@ -1458,12 +1458,12 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1458
1458
case _ => None
1459
1459
}
1460
1460
1461
- def RecursiveType_apply (parentExp : RecursiveType => Type )( using Context ) : RecursiveType =
1461
+ def RecursiveType_apply (parentExp : RecursiveType => Type ): RecursiveType =
1462
1462
Types .RecType (parentExp)
1463
1463
1464
- def RecursiveType_underlying (self : RecursiveType )( using Context ) : Type = self.underlying.stripTypeVar
1464
+ def RecursiveType_underlying (self : RecursiveType ): Type = self.underlying.stripTypeVar
1465
1465
1466
- def RecursiveThis_recThis (self : RecursiveType )( using Context ) : RecursiveThis = self.recThis
1466
+ def RecursiveThis_recThis (self : RecursiveType ): RecursiveThis = self.recThis
1467
1467
1468
1468
type LambdaType [ParamInfo ] = Types .LambdaType { type PInfo = ParamInfo }
1469
1469
@@ -1481,10 +1481,10 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1481
1481
1482
1482
def MethodType_isErased (self : MethodType ): Boolean = self.isErasedMethod
1483
1483
def MethodType_isImplicit (self : MethodType ): Boolean = self.isImplicitMethod
1484
- def MethodType_param (self : MethodType , idx : Int )( using Context ) : Type = self.newParamRef(idx)
1485
- def MethodType_paramNames (self : MethodType )( using Context ) : List [String ] = self.paramNames.map(_.toString)
1486
- def MethodType_paramTypes (self : MethodType )( using Context ) : List [Type ] = self.paramInfos
1487
- def MethodType_resType (self : MethodType )( using Context ) : Type = self.resType
1484
+ def MethodType_param (self : MethodType , idx : Int ): Type = self.newParamRef(idx)
1485
+ def MethodType_paramNames (self : MethodType ): List [String ] = self.paramNames.map(_.toString)
1486
+ def MethodType_paramTypes (self : MethodType ): List [Type ] = self.paramInfos
1487
+ def MethodType_resType (self : MethodType ): Type = self.resType
1488
1488
1489
1489
type PolyType = Types .PolyType
1490
1490
@@ -1495,13 +1495,13 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1495
1495
case _ => None
1496
1496
}
1497
1497
1498
- def PolyType_apply (paramNames : List [String ])(paramBoundsExp : PolyType => List [TypeBounds ], resultTypeExp : PolyType => Type )( using Context ) : PolyType =
1498
+ def PolyType_apply (paramNames : List [String ])(paramBoundsExp : PolyType => List [TypeBounds ], resultTypeExp : PolyType => Type ): PolyType =
1499
1499
Types .PolyType (paramNames.map(_.toTypeName))(paramBoundsExp, resultTypeExp)
1500
1500
1501
- def PolyType_param (self : PolyType , idx : Int )( using Context ) : Type = self.newParamRef(idx)
1502
- def PolyType_paramNames (self : PolyType )( using Context ) : List [String ] = self.paramNames.map(_.toString)
1503
- def PolyType_paramBounds (self : PolyType )( using Context ) : List [TypeBounds ] = self.paramInfos
1504
- def PolyType_resType (self : PolyType )( using Context ) : Type = self.resType
1501
+ def PolyType_param (self : PolyType , idx : Int ): Type = self.newParamRef(idx)
1502
+ def PolyType_paramNames (self : PolyType ): List [String ] = self.paramNames.map(_.toString)
1503
+ def PolyType_paramBounds (self : PolyType ): List [TypeBounds ] = self.paramInfos
1504
+ def PolyType_resType (self : PolyType ): Type = self.resType
1505
1505
1506
1506
type TypeLambda = Types .TypeLambda
1507
1507
@@ -1515,11 +1515,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1515
1515
def TypeLambda_apply (paramNames : List [String ], boundsFn : TypeLambda => List [TypeBounds ], bodyFn : TypeLambda => Type ): TypeLambda =
1516
1516
Types .HKTypeLambda (paramNames.map(_.toTypeName))(boundsFn, bodyFn)
1517
1517
1518
- def TypeLambda_paramNames (self : TypeLambda )( using Context ) : List [String ] = self.paramNames.map(_.toString)
1519
- def TypeLambda_paramBounds (self : TypeLambda )( using Context ) : List [TypeBounds ] = self.paramInfos
1520
- def TypeLambda_param (self : TypeLambda , idx : Int )( using Context ) : Type =
1518
+ def TypeLambda_paramNames (self : TypeLambda ): List [String ] = self.paramNames.map(_.toString)
1519
+ def TypeLambda_paramBounds (self : TypeLambda ): List [TypeBounds ] = self.paramInfos
1520
+ def TypeLambda_param (self : TypeLambda , idx : Int ): Type =
1521
1521
self.newParamRef(idx)
1522
- def TypeLambda_resType (self : TypeLambda )( using Context ) : Type = self.resType
1522
+ def TypeLambda_resType (self : TypeLambda ): Type = self.resType
1523
1523
1524
1524
1525
1525
// ////////////////////
@@ -1702,9 +1702,9 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1702
1702
1703
1703
def Symbol_pos (self : Symbol ): Position = self.sourcePos
1704
1704
1705
- def Symbol_localContext (self : Symbol ): Context =
1706
- if (self.exists) ctx.withOwner(self)
1707
- else ctx
1705
+ // def Symbol_localContext(self: Symbol): Context =
1706
+ // if (self.exists) ctx.withOwner(self)
1707
+ // else ctx
1708
1708
1709
1709
def Symbol_comment (self : Symbol ): Option [Comment ] = {
1710
1710
import dotty .tools .dotc .core .Comments .CommentsContext
0 commit comments