@@ -1015,7 +1015,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1015
1015
case _ => None
1016
1016
}
1017
1017
1018
- def WildcardTypeTree_tpe (self : WildcardTypeTree )(using Context ): TypeOrBounds = self.tpe.stripTypeVar
1018
+ def WildcardTypeTree_tpe (self : WildcardTypeTree )(using Context ): Type = self.tpe.stripTypeVar
1019
1019
1020
1020
type CaseDef = tpd.CaseDef
1021
1021
@@ -1117,34 +1117,9 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1117
1117
// TYPES //
1118
1118
// ///////////
1119
1119
1120
- type TypeOrBounds = Types .Type
1121
-
1122
- type NoPrefix = Types .NoPrefix .type
1123
-
1124
- def NoPrefix_TypeTest (using Context ): TypeTest [TypeOrBounds , NoPrefix ] = new {
1125
- def runtimeClass : Class [? ] = classOf [Types .NoPrefix .type ]
1126
- override def unapply (x : Any ): Option [NoPrefix ] =
1127
- if (x == Types .NoPrefix ) Some (Types .NoPrefix ) else None
1128
- }
1129
-
1130
- type TypeBounds = Types .TypeBounds
1131
-
1132
- def TypeBounds_TypeTest (using Context ): TypeTest [TypeOrBounds , TypeBounds ] = new {
1133
- def runtimeClass : Class [? ] = classOf [TypeBounds ]
1134
- override def unapply (x : Any ): Option [TypeBounds ] = x match
1135
- case x : Types .TypeBounds => Some (x)
1136
- case _ => None
1137
- }
1138
-
1139
- def TypeBounds_apply (low : Type , hi : Type )(using Context ): TypeBounds =
1140
- Types .TypeBounds (low, hi)
1141
-
1142
- def TypeBounds_low (self : TypeBounds )(using Context ): Type = self.lo
1143
- def TypeBounds_hi (self : TypeBounds )(using Context ): Type = self.hi
1144
-
1145
1120
type Type = Types .Type
1146
1121
1147
- def Type_TypeTest (using Context ): TypeTest [TypeOrBounds , Type ] = new {
1122
+ def Type_TypeTest (using Context ): TypeTest [Type , Type ] = new {
1148
1123
def runtimeClass : Class [? ] = classOf [Type ]
1149
1124
override def unapply (x : Any ): Option [Type ] = x match
1150
1125
case x : TypeBounds => None
@@ -1224,12 +1199,12 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1224
1199
def Type_select (self : Type )(sym : Symbol )(using Context ): Type =
1225
1200
self.select(sym)
1226
1201
1227
- def Type_appliedTo (self : Type )(targs : List [TypeOrBounds ]): Type =
1202
+ def Type_appliedTo (self : Type )(targs : List [Type ]): Type =
1228
1203
self.appliedTo(targs)
1229
1204
1230
1205
type ConstantType = Types .ConstantType
1231
1206
1232
- def ConstantType_TypeTest (using Context ): TypeTest [TypeOrBounds , ConstantType ] = new {
1207
+ def ConstantType_TypeTest (using Context ): TypeTest [Type , ConstantType ] = new {
1233
1208
def runtimeClass : Class [? ] = classOf [ConstantType ]
1234
1209
override def unapply (x : Any ): Option [ConstantType ] = x match
1235
1210
case tpe : Types .ConstantType => Some (tpe)
@@ -1243,30 +1218,30 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1243
1218
1244
1219
type TermRef = Types .NamedType
1245
1220
1246
- def TermRef_TypeTest (using Context ): TypeTest [TypeOrBounds , TermRef ] = new {
1221
+ def TermRef_TypeTest (using Context ): TypeTest [Type , TermRef ] = new {
1247
1222
def runtimeClass : Class [? ] = classOf [TermRef ]
1248
1223
override def unapply (x : Any ): Option [TermRef ] = x match
1249
1224
case tp : Types .TermRef => Some (tp)
1250
1225
case _ => None
1251
1226
}
1252
1227
1253
- def TermRef_apply (qual : TypeOrBounds , name : String )(using Context ): TermRef =
1228
+ def TermRef_apply (qual : Type , name : String )(using Context ): TermRef =
1254
1229
Types .TermRef (qual, name.toTermName)
1255
1230
1256
- def TermRef_qualifier (self : TermRef )(using Context ): TypeOrBounds = self.prefix
1231
+ def TermRef_qualifier (self : TermRef )(using Context ): Type = self.prefix
1257
1232
1258
1233
def TermRef_name (self : TermRef )(using Context ): String = self.name.toString
1259
1234
1260
1235
type TypeRef = Types .NamedType
1261
1236
1262
- def TypeRef_TypeTest (using Context ): TypeTest [TypeOrBounds , TypeRef ] = new {
1237
+ def TypeRef_TypeTest (using Context ): TypeTest [Type , TypeRef ] = new {
1263
1238
def runtimeClass : Class [? ] = classOf [TypeRef ]
1264
1239
override def unapply (x : Any ): Option [TypeRef ] = x match
1265
1240
case tp : Types .TypeRef => Some (tp)
1266
1241
case _ => None
1267
1242
}
1268
1243
1269
- def TypeRef_qualifier (self : TypeRef )(using Context ): TypeOrBounds = self.prefix
1244
+ def TypeRef_qualifier (self : TypeRef )(using Context ): Type = self.prefix
1270
1245
1271
1246
def TypeRef_name (self : TypeRef )(using Context ): String = self.name.toString
1272
1247
@@ -1276,7 +1251,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1276
1251
1277
1252
type NamedTermRef = Types .NamedType
1278
1253
1279
- def NamedTermRef_TypeTest (using Context ): TypeTest [TypeOrBounds , NamedTermRef ] = new {
1254
+ def NamedTermRef_TypeTest (using Context ): TypeTest [Type , NamedTermRef ] = new {
1280
1255
def runtimeClass : Class [? ] = classOf [NamedTermRef ]
1281
1256
override def unapply (x : Any ): Option [NamedTermRef ] = x match
1282
1257
case tpe : Types .NamedType =>
@@ -1288,11 +1263,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1288
1263
}
1289
1264
1290
1265
def NamedTermRef_name (self : NamedTermRef )(using Context ): String = self.name.toString
1291
- def NamedTermRef_qualifier (self : NamedTermRef )(using Context ): TypeOrBounds = self.prefix
1266
+ def NamedTermRef_qualifier (self : NamedTermRef )(using Context ): Type = self.prefix
1292
1267
1293
1268
type SuperType = Types .SuperType
1294
1269
1295
- def SuperType_TypeTest (using Context ): TypeTest [TypeOrBounds , SuperType ] = new {
1270
+ def SuperType_TypeTest (using Context ): TypeTest [Type , SuperType ] = new {
1296
1271
def runtimeClass : Class [? ] = classOf [SuperType ]
1297
1272
override def unapply (x : Any ): Option [SuperType ] = x match
1298
1273
case tpe : Types .SuperType => Some (tpe)
@@ -1307,14 +1282,14 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1307
1282
1308
1283
type Refinement = Types .RefinedType
1309
1284
1310
- def Refinement_TypeTest (using Context ): TypeTest [TypeOrBounds , Refinement ] = new {
1285
+ def Refinement_TypeTest (using Context ): TypeTest [Type , Refinement ] = new {
1311
1286
def runtimeClass : Class [? ] = classOf [Refinement ]
1312
1287
override def unapply (x : Any ): Option [Refinement ] = x match
1313
1288
case tpe : Types .RefinedType => Some (tpe)
1314
1289
case _ => None
1315
1290
}
1316
1291
1317
- def Refinement_apply (parent : Type , name : String , info : TypeOrBounds /* Type | TypeBounds */ )(using Context ): Refinement = {
1292
+ def Refinement_apply (parent : Type , name : String , info : Type )(using Context ): Refinement = {
1318
1293
val name1 =
1319
1294
info match
1320
1295
case _ : TypeBounds => name.toTypeName
@@ -1324,23 +1299,23 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1324
1299
1325
1300
def Refinement_parent (self : Refinement )(using Context ): Type = self.parent
1326
1301
def Refinement_name (self : Refinement )(using Context ): String = self.refinedName.toString
1327
- def Refinement_info (self : Refinement )(using Context ): TypeOrBounds = self.refinedInfo
1302
+ def Refinement_info (self : Refinement )(using Context ): Type = self.refinedInfo
1328
1303
1329
1304
type AppliedType = Types .AppliedType
1330
1305
1331
- def AppliedType_TypeTest (using Context ): TypeTest [TypeOrBounds , AppliedType ] = new {
1306
+ def AppliedType_TypeTest (using Context ): TypeTest [Type , AppliedType ] = new {
1332
1307
def runtimeClass : Class [? ] = classOf [AppliedType ]
1333
1308
override def unapply (x : Any ): Option [AppliedType ] = x match
1334
1309
case tpe : Types .AppliedType => Some (tpe)
1335
1310
case _ => None
1336
1311
}
1337
1312
1338
1313
def AppliedType_tycon (self : AppliedType )(using Context ): Type = self.tycon
1339
- def AppliedType_args (self : AppliedType )(using Context ): List [TypeOrBounds ] = self.args
1314
+ def AppliedType_args (self : AppliedType )(using Context ): List [Type ] = self.args
1340
1315
1341
1316
type AnnotatedType = Types .AnnotatedType
1342
1317
1343
- def AnnotatedType_TypeTest (using Context ): TypeTest [TypeOrBounds , AnnotatedType ] = new {
1318
+ def AnnotatedType_TypeTest (using Context ): TypeTest [Type , AnnotatedType ] = new {
1344
1319
def runtimeClass : Class [? ] = classOf [AnnotatedType ]
1345
1320
override def unapply (x : Any ): Option [AnnotatedType ] = x match
1346
1321
case tpe : Types .AnnotatedType => Some (tpe)
@@ -1355,7 +1330,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1355
1330
1356
1331
type AndType = Types .AndType
1357
1332
1358
- def AndType_TypeTest (using Context ): TypeTest [TypeOrBounds , AndType ] = new {
1333
+ def AndType_TypeTest (using Context ): TypeTest [Type , AndType ] = new {
1359
1334
def runtimeClass : Class [? ] = classOf [AndType ]
1360
1335
override def unapply (x : Any ): Option [AndType ] = x match
1361
1336
case tpe : Types .AndType => Some (tpe)
@@ -1370,7 +1345,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1370
1345
1371
1346
type OrType = Types .OrType
1372
1347
1373
- def OrType_TypeTest (using Context ): TypeTest [TypeOrBounds , OrType ] = new {
1348
+ def OrType_TypeTest (using Context ): TypeTest [Type , OrType ] = new {
1374
1349
def runtimeClass : Class [? ] = classOf [OrType ]
1375
1350
override def unapply (x : Any ): Option [OrType ] = x match
1376
1351
case tpe : Types .OrType => Some (tpe)
@@ -1385,7 +1360,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1385
1360
1386
1361
type MatchType = Types .MatchType
1387
1362
1388
- def MatchType_TypeTest (using Context ): TypeTest [TypeOrBounds , MatchType ] = new {
1363
+ def MatchType_TypeTest (using Context ): TypeTest [Type , MatchType ] = new {
1389
1364
def runtimeClass : Class [? ] = classOf [MatchType ]
1390
1365
override def unapply (x : Any ): Option [MatchType ] = x match
1391
1366
case tpe : Types .MatchType => Some (tpe)
@@ -1401,7 +1376,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1401
1376
1402
1377
type ByNameType = Types .ExprType
1403
1378
1404
- def ByNameType_TypeTest (using Context ): TypeTest [TypeOrBounds , ByNameType ] = new {
1379
+ def ByNameType_TypeTest (using Context ): TypeTest [Type , ByNameType ] = new {
1405
1380
def runtimeClass : Class [? ] = classOf [ByNameType ]
1406
1381
override def unapply (x : Any ): Option [ByNameType ] = x match
1407
1382
case tpe : Types .ExprType => Some (tpe)
@@ -1414,21 +1389,21 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1414
1389
1415
1390
type ParamRef = Types .ParamRef
1416
1391
1417
- def ParamRef_TypeTest (using Context ): TypeTest [TypeOrBounds , ParamRef ] = new {
1392
+ def ParamRef_TypeTest (using Context ): TypeTest [Type , ParamRef ] = new {
1418
1393
def runtimeClass : Class [? ] = classOf [ParamRef ]
1419
1394
override def unapply (x : Any ): Option [ParamRef ] = x match
1420
1395
case tpe : Types .TypeParamRef => Some (tpe)
1421
1396
case tpe : Types .TermParamRef => Some (tpe)
1422
1397
case _ => None
1423
1398
}
1424
1399
1425
- def ParamRef_binder (self : ParamRef )(using Context ): LambdaType [ TypeOrBounds ] =
1426
- self.binder.asInstanceOf [LambdaType [ TypeOrBounds ] ] // Cast to tpd
1400
+ def ParamRef_binder (self : ParamRef )(using Context ): LambdaType =
1401
+ self.binder.asInstanceOf [LambdaType ] // Cast to tpd
1427
1402
def ParamRef_paramNum (self : ParamRef )(using Context ): Int = self.paramNum
1428
1403
1429
1404
type ThisType = Types .ThisType
1430
1405
1431
- def ThisType_TypeTest (using Context ): TypeTest [TypeOrBounds , ThisType ] = new {
1406
+ def ThisType_TypeTest (using Context ): TypeTest [Type , ThisType ] = new {
1432
1407
def runtimeClass : Class [? ] = classOf [ThisType ]
1433
1408
override def unapply (x : Any ): Option [ThisType ] = x match
1434
1409
case tpe : Types .ThisType => Some (tpe)
@@ -1439,7 +1414,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1439
1414
1440
1415
type RecursiveThis = Types .RecThis
1441
1416
1442
- def RecursiveThis_TypeTest (using Context ): TypeTest [TypeOrBounds , RecursiveThis ] = new {
1417
+ def RecursiveThis_TypeTest (using Context ): TypeTest [Type , RecursiveThis ] = new {
1443
1418
def runtimeClass : Class [? ] = classOf [RecursiveThis ]
1444
1419
override def unapply (x : Any ): Option [RecursiveThis ] = x match
1445
1420
case tpe : Types .RecThis => Some (tpe)
@@ -1450,7 +1425,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1450
1425
1451
1426
type RecursiveType = Types .RecType
1452
1427
1453
- def RecursiveType_TypeTest (using Context ): TypeTest [TypeOrBounds , RecursiveType ] = new {
1428
+ def RecursiveType_TypeTest (using Context ): TypeTest [Type , RecursiveType ] = new {
1454
1429
def runtimeClass : Class [? ] = classOf [RecursiveType ]
1455
1430
override def unapply (x : Any ): Option [RecursiveType ] = x match
1456
1431
case tpe : Types .RecType => Some (tpe)
@@ -1464,11 +1439,11 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1464
1439
1465
1440
def RecursiveThis_recThis (self : RecursiveType )(using Context ): RecursiveThis = self.recThis
1466
1441
1467
- type LambdaType [ ParamInfo ] = Types .LambdaType { type PInfo = ParamInfo }
1442
+ type LambdaType = Types .LambdaType
1468
1443
1469
1444
type MethodType = Types .MethodType
1470
1445
1471
- def MethodType_TypeTest (using Context ): TypeTest [TypeOrBounds , MethodType ] = new {
1446
+ def MethodType_TypeTest (using Context ): TypeTest [Type , MethodType ] = new {
1472
1447
def runtimeClass : Class [? ] = classOf [MethodType ]
1473
1448
override def unapply (x : Any ): Option [MethodType ] = x match
1474
1449
case tpe : Types .MethodType => Some (tpe)
@@ -1487,7 +1462,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1487
1462
1488
1463
type PolyType = Types .PolyType
1489
1464
1490
- def PolyType_TypeTest (using Context ): TypeTest [TypeOrBounds , PolyType ] = new {
1465
+ def PolyType_TypeTest (using Context ): TypeTest [Type , PolyType ] = new {
1491
1466
def runtimeClass : Class [? ] = classOf [PolyType ]
1492
1467
override def unapply (x : Any ): Option [PolyType ] = x match
1493
1468
case tpe : Types .PolyType => Some (tpe)
@@ -1504,7 +1479,7 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1504
1479
1505
1480
type TypeLambda = Types .TypeLambda
1506
1481
1507
- def TypeLambda_TypeTest (using Context ): TypeTest [TypeOrBounds , TypeLambda ] = new {
1482
+ def TypeLambda_TypeTest (using Context ): TypeTest [Type , TypeLambda ] = new {
1508
1483
def runtimeClass : Class [? ] = classOf [TypeLambda ]
1509
1484
override def unapply (x : Any ): Option [TypeLambda ] = x match
1510
1485
case tpe : Types .TypeLambda => Some (tpe)
@@ -1520,6 +1495,28 @@ class ReflectionCompilerInterface(val rootContext: Context) extends CompilerInte
1520
1495
self.newParamRef(idx)
1521
1496
def TypeLambda_resType (self : TypeLambda )(using Context ): Type = self.resType
1522
1497
1498
+ type NoPrefix = Types .NoPrefix .type
1499
+
1500
+ def NoPrefix_TypeTest (using Context ): TypeTest [Type , NoPrefix ] = new {
1501
+ def runtimeClass : Class [? ] = classOf [Types .NoPrefix .type ]
1502
+ override def unapply (x : Any ): Option [NoPrefix ] =
1503
+ if (x == Types .NoPrefix ) Some (Types .NoPrefix ) else None
1504
+ }
1505
+
1506
+ type TypeBounds = Types .TypeBounds
1507
+
1508
+ def TypeBounds_TypeTest (using Context ): TypeTest [Type , TypeBounds ] = new {
1509
+ def runtimeClass : Class [? ] = classOf [TypeBounds ]
1510
+ override def unapply (x : Any ): Option [TypeBounds ] = x match
1511
+ case x : Types .TypeBounds => Some (x)
1512
+ case _ => None
1513
+ }
1514
+
1515
+ def TypeBounds_apply (low : Type , hi : Type )(using Context ): TypeBounds =
1516
+ Types .TypeBounds (low, hi)
1517
+
1518
+ def TypeBounds_low (self : TypeBounds )(using Context ): Type = self.lo
1519
+ def TypeBounds_hi (self : TypeBounds )(using Context ): Type = self.hi
1523
1520
1524
1521
// ////////////////////
1525
1522
// IMPORT SELECTORS //
0 commit comments