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