Skip to content

Commit 160bad2

Browse files
committed
Remove TermOrTypeTree and use Tree
1 parent fb5f46e commit 160bad2

File tree

9 files changed

+25
-93
lines changed

9 files changed

+25
-93
lines changed

compiler/src/dotty/tools/dotc/tastyreflect/KernelImpl.scala

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
5151
// TREES
5252
//
5353

54-
type TermOrTypeTree = tpd.Tree
55-
5654
type Tree = tpd.Tree
5755

5856
def Tree_pos(self: Tree)(implicit ctx: Context): Position = self.sourcePos
@@ -135,14 +133,14 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
135133
}
136134

137135
def ClassDef_constructor(self: ClassDef)(implicit ctx: Context): DefDef = ClassDef_rhs(self).constr
138-
def ClassDef_parents(self: ClassDef)(implicit ctx: Context): List[TermOrTypeTree] = ClassDef_rhs(self).parents
136+
def ClassDef_parents(self: ClassDef)(implicit ctx: Context): List[Tree /* Term | TypeTree */] = ClassDef_rhs(self).parents
139137
def ClassDef_derived(self: ClassDef)(implicit ctx: Context): List[TypeTree] = ClassDef_rhs(self).derived.asInstanceOf[List[TypeTree]]
140138
def ClassDef_self(self: ClassDef)(implicit ctx: Context): Option[ValDef] = optional(ClassDef_rhs(self).self)
141139
def ClassDef_body(self: ClassDef)(implicit ctx: Context): List[Statement] = ClassDef_rhs(self).body
142140
def ClassDef_symbol(self: ClassDef)(implicit ctx: Context): ClassSymbol = self.symbol.asClass
143141
private def ClassDef_rhs(self: ClassDef) = self.rhs.asInstanceOf[tpd.Template]
144142

145-
def ClassDef_copy(original: ClassDef)(name: String, constr: DefDef, parents: List[TermOrTypeTree], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef = {
143+
def ClassDef_copy(original: ClassDef)(name: String, constr: DefDef, parents: List[Tree /* Term | TypeTree */], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef = {
146144
val Trees.TypeDef(_, originalImpl: tpd.Template) = original
147145
tpd.cpy.TypeDef(original)(name.toTypeName, tpd.cpy.Template(originalImpl)(constr, parents, derived, selfOpt.getOrElse(tpd.EmptyValDef), body))
148146
}
@@ -205,10 +203,6 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
205203
case _ => None
206204
}
207205

208-
// TODO move to Kernel and use isTerm directly with a cast
209-
def matchTermNotTypeTree(termOrTypeTree: TermOrTypeTree)(implicit ctx: Context): Option[Term] =
210-
if (termOrTypeTree.isTerm) Some(termOrTypeTree) else None
211-
212206
def Term_pos(self: Term)(implicit ctx: Context): Position = self.sourcePos
213207
def Term_tpe(self: Term)(implicit ctx: Context): Type = self.tpe
214208
def Term_underlyingArgument(self: Term)(implicit ctx: Context): Term = self.underlyingArgument
@@ -453,14 +447,14 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
453447
case _ => None
454448
}
455449

456-
def Inlined_call(self: Inlined)(implicit ctx: Context): Option[TermOrTypeTree] = optional(self.call)
450+
def Inlined_call(self: Inlined)(implicit ctx: Context): Option[Tree /* Term | TypeTree */] = optional(self.call)
457451
def Inlined_bindings(self: Inlined)(implicit ctx: Context): List[Definition] = self.bindings
458452
def Inlined_body(self: Inlined)(implicit ctx: Context): Term = self.expansion
459453

460-
def Inlined_apply(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
454+
def Inlined_apply(call: Option[Tree /* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
461455
withDefaultPos(ctx => tpd.Inlined(call.getOrElse(tpd.EmptyTree), bindings.map { case b: tpd.MemberDef => b }, expansion)(ctx))
462456

463-
def Inlined_copy(original: Tree)(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
457+
def Inlined_copy(original: Tree)(call: Option[Tree /* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
464458
tpd.cpy.Inlined(original)(call.getOrElse(tpd.EmptyTree), bindings.asInstanceOf[List[tpd.MemberDef]], expansion)
465459

466460
type Lambda = tpd.Closure
@@ -611,12 +605,6 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
611605
case _ => if (x.isType) Some(x) else None
612606
}
613607

614-
// TODO move to Kernel and use isTypeTree directly with a cast
615-
def matchTypeTreeNotTerm(termOrTypeTree: TermOrTypeTree)(implicit ctx: Context): Option[TypeTree] = termOrTypeTree match {
616-
case _: tpd.TypeBoundsTree => None
617-
case _ => if (termOrTypeTree.isType) Some(termOrTypeTree) else None
618-
}
619-
620608
def TypeTree_pos(self: TypeTree)(implicit ctx: Context): Position = self.sourcePos
621609
def TypeTree_symbol(self: TypeTree)(implicit ctx: Context): Symbol = self.symbol
622610
def TypeTree_tpe(self: TypeTree)(implicit ctx: Context): Type = self.tpe.stripTypeVar

docs/docs/reference/other-new-features/tasty-reflect.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ TASTy Reflect provides the following types:
186186
+- BindSymbol
187187
+- NoSymbol
188188
189-
Aliases:
190-
# TermOrTypeTree = Term | TypeTree
191189
```
192190

193191
## More Examples

library/src/scala/tasty/reflect/Core.scala

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ package scala.tasty.reflect
111111
*
112112
* +- Flags
113113
*
114-
* Aliases:
115-
* # TermOrTypeTree = Term | TypeTree
116-
*
117114
* ```
118115
*/
119116
trait Core {
@@ -126,10 +123,6 @@ trait Core {
126123
/** Settings */
127124
type Settings = kernel.Settings
128125

129-
// TODO: When bootstrapped, remove and use `Term | TypeTree` type directly in other files
130-
/** Workaround missing `|` types in Scala 2 to represent `Term | TypeTree` */
131-
type TermOrTypeTree /* Term | TypeTree */ = kernel.TermOrTypeTree
132-
133126
/** Tree representing code written in the source */
134127
type Tree = kernel.Tree
135128

library/src/scala/tasty/reflect/Kernel.scala

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ package scala.tasty.reflect
110110
*
111111
* +- Flags
112112
*
113-
* Aliases:
114-
* # TermOrTypeTree = Term | TypeTree
115-
*
116113
* ```
117114
*/
118115
trait Kernel {
@@ -161,10 +158,6 @@ trait Kernel {
161158
// TREES
162159
//
163160

164-
// TODO: When bootstrapped, remove and use `Term | TypeTree` type directly in other files
165-
/** Workaround missing `|` types in Scala 2 to represent `Term | TypeTree` */
166-
type TermOrTypeTree /* Term | TypeTree */ <: AnyRef
167-
168161
/** Tree representing code written in the source */
169162
type Tree <: AnyRef
170163

@@ -223,13 +216,13 @@ trait Kernel {
223216
def matchClassDef(tree: Tree)(implicit ctx: Context): Option[ClassDef]
224217

225218
def ClassDef_constructor(self: ClassDef)(implicit ctx: Context): DefDef
226-
def ClassDef_parents(self: ClassDef)(implicit ctx: Context): List[TermOrTypeTree]
219+
def ClassDef_parents(self: ClassDef)(implicit ctx: Context): List[Tree/* Term | TypeTree */]
227220
def ClassDef_derived(self: ClassDef)(implicit ctx: Context): List[TypeTree]
228221
def ClassDef_self(self: ClassDef)(implicit ctx: Context): Option[ValDef]
229222
def ClassDef_body(self: ClassDef)(implicit ctx: Context): List[Statement]
230223
def ClassDef_symbol(self: ClassDef)(implicit ctx: Context): ClassSymbol
231224

232-
def ClassDef_copy(original: ClassDef)(name: String, constr: DefDef, parents: List[TermOrTypeTree], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef
225+
def ClassDef_copy(original: ClassDef)(name: String, constr: DefDef, parents: List[Tree/* Term | TypeTree */], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef
233226

234227
/** Tree representing a type (paramter or member) definition in the source code */
235228
type TypeDef <: Definition
@@ -273,8 +266,6 @@ trait Kernel {
273266

274267
def matchTerm(tree: Tree)(implicit ctx: Context): Option[Term]
275268

276-
def matchTermNotTypeTree(termOrTypeTree: TermOrTypeTree)(implicit ctx: Context): Option[Term]
277-
278269
def Term_pos(self: Term)(implicit ctx: Context): Position
279270
def Term_tpe(self: Term)(implicit ctx: Context): Type
280271
def Term_underlyingArgument(self: Term)(implicit ctx: Context): Term
@@ -488,12 +479,12 @@ trait Kernel {
488479

489480
def matchInlined(tree: Tree)(implicit ctx: Context): Option[Inlined]
490481

491-
def Inlined_call(self: Inlined)(implicit ctx: Context): Option[TermOrTypeTree]
482+
def Inlined_call(self: Inlined)(implicit ctx: Context): Option[Tree/* Term | TypeTree */]
492483
def Inlined_bindings(self: Inlined)(implicit ctx: Context): List[Definition]
493484
def Inlined_body(self: Inlined)(implicit ctx: Context): Term
494485

495-
def Inlined_apply(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined
496-
def Inlined_copy(original: Tree)(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined
486+
def Inlined_apply(call: Option[Tree/* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined
487+
def Inlined_copy(original: Tree)(call: Option[Tree/* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined
497488

498489
/** Tree representing a selection of definition with a given name on a given prefix and number of nested scopes of inlined trees */
499490
type SelectOuter <: Term
@@ -527,7 +518,6 @@ trait Kernel {
527518
type TypeTree <: TypeOrBoundsTree
528519

529520
def matchTypeTree(tree: Tree)(implicit ctx: Context): Option[TypeTree]
530-
def matchTypeTreeNotTerm(termOrTypeTree: TermOrTypeTree)(implicit ctx: Context): Option[TypeTree]
531521

532522
def TypeTree_pos(self: TypeTree)(implicit ctx: Context): Position
533523
def TypeTree_symbol(self: TypeTree)(implicit ctx: Context): Symbol

library/src/scala/tasty/reflect/Printers.scala

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ trait Printers
201201
this += "Term.Repeated(" ++= elems += ", " += elemtpt += ")"
202202
case Term.Inlined(call, bindings, expansion) =>
203203
this += "Term.Inlined("
204-
visitOption(call, visitTermOrTypeTree)
204+
visitOption(call, visitTree)
205205
this += ", " ++= bindings += ", " += expansion += ")"
206206
case ValDef(name, tpt, rhs) =>
207207
this += "ValDef(\"" += name += "\", " += tpt += ", " += rhs += ")"
@@ -211,7 +211,7 @@ trait Printers
211211
this += "TypeDef(\"" += name += "\", " += rhs += ")"
212212
case ClassDef(name, constr, parents, derived, self, body) =>
213213
this += "ClassDef(\"" += name += "\", " += constr += ", "
214-
visitList[TermOrTypeTree](parents, visitTermOrTypeTree)
214+
visitList[Tree](parents, visitTree)
215215
this += ", "
216216
visitList[TypeTree](derived, visitTree)
217217
this += ", " += self += ", " ++= body += ")"
@@ -276,11 +276,6 @@ trait Printers
276276
this += "Pattern.TypeTest(" += tpt += ")"
277277
}
278278

279-
def visitTermOrTypeTree(x: TermOrTypeTree): Buffer = x match {
280-
case IsTerm(termOrTypeTree) => this += termOrTypeTree
281-
case IsTypeTree(termOrTypeTree) => this += termOrTypeTree
282-
}
283-
284279
def visitConstant(x: Constant): Buffer = x match {
285280
case Constant.Unit() => this += "Constant.Unit()"
286281
case Constant.Null() => this += "Constant.Null()"
@@ -618,7 +613,7 @@ trait Printers
618613
if (parents1.nonEmpty)
619614
this += highlightKeyword(" extends ", color)
620615

621-
def printParent(parent: TermOrTypeTree, needEmptyParens: Boolean = false): Unit = parent match {
616+
def printParent(parent: Tree /* Term | TypeTree */, needEmptyParens: Boolean = false): Unit = parent match {
622617
case IsTypeTree(parent) =>
623618
printTypeTree(parent)
624619
case IsTerm(Term.TypeApply(fun, targs)) =>
@@ -637,7 +632,7 @@ trait Printers
637632
throw new MatchError(parent.show)
638633
}
639634

640-
def printSeparated(list: List[TermOrTypeTree]): Unit = list match {
635+
def printSeparated(list: List[Tree /* Term | TypeTree */]): Unit = list match {
641636
case Nil =>
642637
case x :: Nil => printParent(x)
643638
case x :: xs =>

library/src/scala/tasty/reflect/TreeOps.scala

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ package reflect
33

44
trait TreeOps extends Core {
55

6-
// Decorators
7-
8-
implicit def termAsTermOrTypeTree(term: Term): TermOrTypeTree = term.asInstanceOf[TermOrTypeTree]
9-
implicit def typeTreeAsTermOrTypeTree(term: TypeTree): TermOrTypeTree = term.asInstanceOf[TermOrTypeTree]
10-
116
// ----- Tree -----------------------------------------------------
127

138
implicit class TreeAPI(self: Tree) {
@@ -80,15 +75,15 @@ trait TreeOps extends Core {
8075

8176
object ClassDef {
8277
// TODO def apply(name: String, constr: DefDef, parents: List[TermOrTypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef
83-
def copy(original: ClassDef)(name: String, constr: DefDef, parents: List[TermOrTypeTree], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef =
78+
def copy(original: ClassDef)(name: String, constr: DefDef, parents: List[Tree /* Term | TypeTree */], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement])(implicit ctx: Context): ClassDef =
8479
kernel.ClassDef_copy(original)(name, constr, parents, derived, selfOpt, body)
85-
def unapply(tree: Tree)(implicit ctx: Context): Option[(String, DefDef, List[TermOrTypeTree], List[TypeTree], Option[ValDef], List[Statement])] =
80+
def unapply(tree: Tree)(implicit ctx: Context): Option[(String, DefDef, List[Tree /* Term | TypeTree */], List[TypeTree], Option[ValDef], List[Statement])] =
8681
kernel.matchClassDef(tree).map(x => (x.name, x.constructor, x.parents, x.derived, x.self, x.body))
8782
}
8883

8984
implicit class ClassDefAPI(self: ClassDef) {
9085
def constructor(implicit ctx: Context): DefDef = kernel.ClassDef_constructor(self)
91-
def parents(implicit ctx: Context): List[TermOrTypeTree] = kernel.ClassDef_parents(self)
86+
def parents(implicit ctx: Context): List[Tree /* Term | TypeTree */] = kernel.ClassDef_parents(self)
9287
def derived(implicit ctx: Context): List[TypeTree] = kernel.ClassDef_derived(self)
9388
def self(implicit ctx: Context): Option[ValDef] = kernel.ClassDef_self(self)
9489
def body(implicit ctx: Context): List[Statement] = kernel.ClassDef_body(self)
@@ -190,10 +185,6 @@ trait TreeOps extends Core {
190185
/** Matches any term */
191186
def unapply(tree: Tree)(implicit ctx: Context): Option[Term] =
192187
kernel.matchTerm(tree)
193-
194-
/** Matches any term */
195-
def unapply(parent: TermOrTypeTree)(implicit ctx: Context, dummy: DummyImplicit): Option[Term] =
196-
kernel.matchTermNotTypeTree(parent)
197188
}
198189

199190
/** Scala term. Any tree that can go in expression position. */
@@ -587,13 +578,13 @@ trait TreeOps extends Core {
587578

588579
object Inlined {
589580

590-
def apply(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
581+
def apply(call: Option[Tree /* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
591582
kernel.Inlined_apply(call, bindings, expansion)
592583

593-
def copy(original: Tree)(call: Option[TermOrTypeTree], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
584+
def copy(original: Tree)(call: Option[Tree /* Term | TypeTree */], bindings: List[Definition], expansion: Term)(implicit ctx: Context): Inlined =
594585
kernel.Inlined_copy(original)(call, bindings, expansion)
595586

596-
def unapply(tree: Tree)(implicit ctx: Context): Option[(Option[TermOrTypeTree], List[Definition], Term)] =
587+
def unapply(tree: Tree)(implicit ctx: Context): Option[(Option[Tree /* Term | TypeTree */], List[Definition], Term)] =
597588
kernel.matchInlined(tree).map(x => (x.call, x.bindings, x.body))
598589

599590
}
@@ -726,7 +717,7 @@ trait TreeOps extends Core {
726717
}
727718

728719
implicit class InlinedAPI(self: Term.Inlined) {
729-
def call(implicit ctx: Context): Option[TermOrTypeTree] = kernel.Inlined_call(self)
720+
def call(implicit ctx: Context): Option[Tree /* Term | TypeTree */] = kernel.Inlined_call(self)
730721
def bindings(implicit ctx: Context): List[Definition] = kernel.Inlined_bindings(self)
731722
def body(implicit ctx: Context): Term = kernel.Inlined_body(self)
732723
}
@@ -764,8 +755,6 @@ trait TreeOps extends Core {
764755
object IsTypeTree {
765756
def unapply(tpt: Tree)(implicit ctx: Context): Option[TypeTree] =
766757
kernel.matchTypeTree(tpt)
767-
def unapply(termOrTypeTree: TermOrTypeTree)(implicit ctx: Context, dummy: DummyImplicit): Option[TypeTree] =
768-
kernel.matchTypeTreeNotTerm(termOrTypeTree)
769758
}
770759

771760
object TypeTree extends TypeTreeCoreModule {

library/src/scala/tasty/reflect/TreeUtils.scala

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ trait TreeUtils
2121
def foldCaseDefs(x: X, trees: Iterable[CaseDef])(implicit ctx: Context): X = (x /: trees)(foldCaseDef)
2222
def foldTypeCaseDefs(x: X, trees: Iterable[TypeCaseDef])(implicit ctx: Context): X = (x /: trees)(foldTypeCaseDef)
2323
def foldPatterns(x: X, trees: Iterable[Pattern])(implicit ctx: Context): X = (x /: trees)(foldPattern)
24-
private def foldParents(x: X, trees: Iterable[TermOrTypeTree])(implicit ctx: Context): X = (x /: trees)(foldTermOrTypeTree)
2524

2625
def foldOverTree(x: X, tree: Tree)(implicit ctx: Context): X = {
2726
def localCtx(definition: Definition): Context = definition.symbol.localContext
@@ -76,7 +75,7 @@ trait TreeUtils
7675
foldTree(x, rhs)
7776
case IsDefinition(cdef @ ClassDef(_, constr, parents, derived, self, body)) =>
7877
implicit val ctx = localCtx(cdef)
79-
foldTrees(foldTrees(foldTrees(foldParents(foldTree(x, constr), parents), derived), self), body)
78+
foldTrees(foldTrees(foldTrees(foldTrees(foldTree(x, constr), parents), derived), self), body)
8079
case Import(_, expr, _) =>
8180
foldTree(x, expr)
8281
case IsPackageClause(clause @ PackageClause(pid, stats)) =>
@@ -116,11 +115,6 @@ trait TreeUtils
116115
case Pattern.TypeTest(tpt) => foldTree(x, tpt)
117116
}
118117

119-
private def foldTermOrTypeTree(x: X, tree: TermOrTypeTree)(implicit ctx: Context): X = tree match {
120-
case IsTerm(termOrTypeTree) => foldTree(x, termOrTypeTree)
121-
case IsTypeTree(termOrTypeTree) => foldTree(x, termOrTypeTree)
122-
}
123-
124118
}
125119

126120
abstract class TreeTraverser extends TreeAccumulator[Unit] {

semanticdb/src/dotty/semanticdb/SemanticdbConsumer.scala

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,6 @@ class SemanticdbConsumer(sourceFilePath: java.nio.file.Path) extends TastyConsum
9999
}
100100
}
101101

102-
implicit class TermOrTypeTreeExtender(tree: TermOrTypeTree) {
103-
def pos: Position = tree match {
104-
case IsTerm(t) => t.pos
105-
case IsTypeTree(t) => t.pos
106-
}
107-
108-
def symbol: Symbol = tree match {
109-
case IsTerm(t) => t.symbol
110-
case IsTypeTree(t) => t.symbol
111-
}
112-
}
113-
114102
implicit class TypeOrBoundsTreeExtender(tree: TypeOrBoundsTree) {
115103
def typetree: TypeTree = tree match {
116104
case IsTypeTree(t) => t
@@ -809,10 +797,7 @@ class SemanticdbConsumer(sourceFilePath: java.nio.file.Path) extends TastyConsum
809797
fittedInitClassRange = None
810798

811799
// we add the parents to the symbol list
812-
parents.foreach(_ match {
813-
case IsTypeTree(t) => traverseTree(t)
814-
case IsTerm(t) => traverseTree(t)
815-
})
800+
parents.foreach(traverseTree)
816801

817802
selfopt match {
818803
case Some(vdef @ ValDef(name, type_, _)) => {
@@ -827,7 +812,7 @@ class SemanticdbConsumer(sourceFilePath: java.nio.file.Path) extends TastyConsum
827812
// 2) Find the first '{'
828813
// 3) Iterate until the character we are seeing is a letter
829814
val startPosSearch: Int = parents.foldLeft(tree.pos.end)(
830-
(old: Int, ct: TermOrTypeTree) =>
815+
(old: Int, ct: Tree) =>
831816
ct match {
832817
case IsTerm(t) if t.pos.end < old => t.pos.end
833818
case _ => old

tests/pos-special/fatal-warnings/tasty-parent-unapply.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ object Macros {
88
def impl(reflect: Reflection): Unit = {
99
import reflect._
1010

11-
def foo(tree: Tree, term: Term, typeTree: TypeTree, parent: TermOrTypeTree) = {
11+
def foo(tree: Tree, term: Term, typeTree: TypeTree, parent: Tree) = {
1212

1313
tree match {
1414
case IsTerm(tree) =>

0 commit comments

Comments
 (0)