@@ -208,17 +208,17 @@ object Types {
208
208
def loop (tp : Type ): Boolean = tp match {
209
209
case tp : TypeRef =>
210
210
val sym = tp.symbol
211
- if (sym.isClass) sym.derivesFrom(cls) else loop(tp.superType): @ tailrec
211
+ if (sym.isClass) sym.derivesFrom(cls) else loop(tp.superType)
212
212
case tp : AppliedType =>
213
213
tp.superType.derivesFrom(cls)
214
214
case tp : MatchType =>
215
215
tp.bound.derivesFrom(cls) || tp.reduced.derivesFrom(cls)
216
216
case tp : TypeProxy =>
217
- loop(tp.underlying): @ tailrec
217
+ loop(tp.underlying)
218
218
case tp : AndType =>
219
- loop(tp.tp1) || loop(tp.tp2): @ tailrec
219
+ loop(tp.tp1) || loop(tp.tp2)
220
220
case tp : OrType =>
221
- loop(tp.tp1) && loop(tp.tp2): @ tailrec
221
+ loop(tp.tp1) && loop(tp.tp2)
222
222
case tp : JavaArrayType =>
223
223
cls == defn.ObjectClass
224
224
case _ =>
@@ -403,16 +403,16 @@ object Types {
403
403
*/
404
404
final def classSymbol (implicit ctx : Context ): Symbol = this match {
405
405
case ConstantType (constant) =>
406
- constant.tpe.classSymbol: @ tailrec
406
+ constant.tpe.classSymbol
407
407
case tp : TypeRef =>
408
408
val sym = tp.symbol
409
- if (sym.isClass) sym else tp.superType.classSymbol: @ tailrec
409
+ if (sym.isClass) sym else tp.superType.classSymbol
410
410
case tp : ClassInfo =>
411
411
tp.cls
412
412
case tp : SingletonType =>
413
413
NoSymbol
414
414
case tp : TypeProxy =>
415
- tp.underlying.classSymbol: @ tailrec
415
+ tp.underlying.classSymbol
416
416
case AndType (l, r) =>
417
417
val lsym = l.classSymbol
418
418
val rsym = r.classSymbol
@@ -436,9 +436,9 @@ object Types {
436
436
tp.cls :: Nil
437
437
case tp : TypeRef =>
438
438
val sym = tp.symbol
439
- if (sym.isClass) sym.asClass :: Nil else tp.superType.classSymbols: @ tailrec
439
+ if (sym.isClass) sym.asClass :: Nil else tp.superType.classSymbols
440
440
case tp : TypeProxy =>
441
- tp.underlying.classSymbols: @ tailrec
441
+ tp.underlying.classSymbols
442
442
case AndType (l, r) =>
443
443
l.classSymbols union r.classSymbols
444
444
case OrType (l, r) =>
@@ -479,7 +479,7 @@ object Types {
479
479
case tp : ClassInfo =>
480
480
tp.decls
481
481
case tp : TypeProxy =>
482
- tp.underlying.decls: @ tailrec
482
+ tp.underlying.decls
483
483
case _ =>
484
484
EmptyScope
485
485
}
@@ -725,7 +725,7 @@ object Types {
725
725
val ns = tp.parent.memberNames(keepOnly, pre)
726
726
if (keepOnly(pre, tp.refinedName)) ns + tp.refinedName else ns
727
727
case tp : TypeProxy =>
728
- tp.underlying.memberNames(keepOnly, pre): @ tailrec
728
+ tp.underlying.memberNames(keepOnly, pre)
729
729
case tp : AndType =>
730
730
tp.tp1.memberNames(keepOnly, pre) | tp.tp2.memberNames(keepOnly, pre)
731
731
case tp : OrType =>
@@ -1042,21 +1042,21 @@ object Types {
1042
1042
case tp : TypeRef =>
1043
1043
if (tp.symbol.isClass) tp
1044
1044
else tp.info match {
1045
- case TypeAlias (alias) => alias.dealias1(keep): @ tailrec
1045
+ case TypeAlias (alias) => alias.dealias1(keep)
1046
1046
case _ => tp
1047
1047
}
1048
1048
case app @ AppliedType (tycon, args) =>
1049
1049
val tycon1 = tycon.dealias1(keep)
1050
- if (tycon1 ne tycon) app.superType.dealias1(keep): @ tailrec
1050
+ if (tycon1 ne tycon) app.superType.dealias1(keep)
1051
1051
else this
1052
1052
case tp : TypeVar =>
1053
1053
val tp1 = tp.instanceOpt
1054
- if (tp1.exists) tp1.dealias1(keep): @ tailrec else tp
1054
+ if (tp1.exists) tp1.dealias1(keep) else tp
1055
1055
case tp : AnnotatedType =>
1056
1056
val tp1 = tp.parent.dealias1(keep)
1057
1057
if (keep(tp)(ctx)) tp.derivedAnnotatedType(tp1, tp.annot) else tp1
1058
1058
case tp : LazyRef =>
1059
- tp.ref.dealias1(keep): @ tailrec
1059
+ tp.ref.dealias1(keep)
1060
1060
case _ => this
1061
1061
}
1062
1062
0 commit comments