File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -38,14 +38,14 @@ object PickledQuotes {
3838
3939 /** Transform the expression into its fully spliced Tree */
4040 def quotedExprToTree [T ](expr : quoted.Expr [T ])(implicit ctx : Context ): Tree = {
41- val expr1 = expr.asInstanceOf [TastyTreeExpr [ Tree ] ]
41+ val expr1 = expr.asInstanceOf [TastyTreeExpr ]
4242 QuoteContext .checkScopeId(expr1.scopeId)
4343 healOwner(expr1.tree)
4444 }
4545
4646 /** Transform the expression into its fully spliced TypeTree */
4747 def quotedTypeToTree (tpe : quoted.Type [? ])(implicit ctx : Context ): Tree = {
48- val tpe1 = tpe.asInstanceOf [TreeType [ Tree ] ]
48+ val tpe1 = tpe.asInstanceOf [TreeType ]
4949 QuoteContext .checkScopeId(tpe1.scopeId)
5050 healOwner(tpe1.typeTree)
5151 }
Original file line number Diff line number Diff line change 11package dotty .tools .dotc .tastyreflect
22
3+ import dotty .tools .dotc .ast .tpd .Tree
4+
35/** An Expr backed by a tree. Only the current compiler trees are allowed.
46 *
57 * These expressions are used for arguments of macros. They contain and actual tree
68 * from the program that is being expanded by the macro.
79 *
810 * May contain references to code defined outside this TastyTreeExpr instance.
911 */
10- final class TastyTreeExpr [ Tree ] (val tree : Tree , val scopeId : Int ) extends scala.quoted.Expr [Any ] {
12+ final class TastyTreeExpr (val tree : Tree , val scopeId : Int ) extends scala.quoted.Expr [Any ] {
1113 override def equals (that : Any ): Boolean = that match {
12- case that : TastyTreeExpr [_] =>
14+ case that : TastyTreeExpr =>
1315 // TastyTreeExpr are wrappers around trees, therfore they are equals if their trees are equal.
1416 // All scopeId should be equal unless two different runs of the compiler created the trees.
1517 tree == that.tree && scopeId == that.scopeId
Original file line number Diff line number Diff line change 11package dotty .tools .dotc .tastyreflect
22
3+ import dotty .tools .dotc .ast .tpd .Tree
4+
35/** An Type backed by a tree */
4- final class TreeType [ Tree ] (val typeTree : Tree , val scopeId : Int ) extends scala.quoted.Type [Any ] {
6+ final class TreeType (val typeTree : Tree , val scopeId : Int ) extends scala.quoted.Type [Any ] {
57 override def equals (that : Any ): Boolean = that match {
6- case that : TreeType [_] => typeTree ==
8+ case that : TreeType => typeTree ==
79 // TastyTreeExpr are wrappers around trees, therfore they are equals if their trees are equal.
810 // All scopeId should be equal unless two different runs of the compiler created the trees.
911 that.typeTree && scopeId == that.scopeId
You can’t perform that action at this time.
0 commit comments