Skip to content

Commit 24a7940

Browse files
committed
scala#8514: cleanups
1 parent edff416 commit 24a7940

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

tests/run-macros/i8514b.check

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
List(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),module class <empty>)),B), AppliedType(TypeRef(ThisType(TypeRef(NoPrefix,module class <empty>)),class A),List(HKTypeLambda(List(T), List(TypeBounds(TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module scala),Nothing),TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module scala),Any))), AppliedType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),module class <empty>)),P),List(TypeParamRef(T)))), TypeRef(TermRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module scala),Predef),String))), TypeRef(ThisType(TypeRef(NoPrefix,module class lang)),class Object), TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))
1+
B
2+
A[[T >: scala.Nothing <: scala.Any] => P[T], scala.Predef.String]
3+
java.lang.Object
4+
scala.Any

tests/run-macros/i8514b/Macro_1.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ def testExpr(using QuoteContext): Expr[Unit] = {
1010
import qctx.tasty._
1111

1212
val t = '[B].unseal.tpe
13+
val baseTypes = t.baseClasses.map(b => t.baseType(b))
14+
1315
'{
14-
println(${Expr(t.baseClasses.map(b => t.baseType(b).toString))})
16+
println(${Expr(baseTypes.map(_.show).mkString("\n"))})
1517
}
1618
}

0 commit comments

Comments
 (0)