traverse(tree: Tree) used to call super.traverse(tree) at the end.
sbt/sbt@0f616294c4 brought the traversing
call to inside of the pattern matching.
For the case of MacroExpansionOf(original), it amounts to not traveling
the macro-expanded code. See
sbt/src/sbt-test/source-dependencies/macro-nonarg-dep for the repro.
This commit is contained in:
Eugene Yokota 2016-04-18 02:34:53 -04:00
parent 8c819fea6d
commit c971d7f45c
1 changed files with 3 additions and 1 deletions

View File

@ -146,7 +146,9 @@ final class Dependency(val global: CallbackGlobal) extends LocateClassFile {
// In some cases (eg. macro annotations), `typeTree.tpe` may be null. See sbt/sbt#1593 and sbt/sbt#1655.
case typeTree: TypeTree if typeTree.tpe != null => symbolsInType(typeTree.tpe) foreach addDependency
case MacroExpansionOf(original) if inspectedOriginalTrees.add(original) => traverse(original)
case m @ MacroExpansionOf(original) if inspectedOriginalTrees.add(original) =>
traverse(original)
super.traverse(m)
case other => super.traverse(other)
}