Skip to content

Commit

Permalink
Merge pull request #5542 from dotty-staging/remove-tasty-reflect-sele…
Browse files Browse the repository at this point in the history
…ct-sig

Remove TASTy Reflect Select signature from extractor
  • Loading branch information
nicolasstucki committed Nov 29, 2018
2 parents 380804a + 8c8e8bc commit 2ec79d1
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 75 deletions.
8 changes: 2 additions & 6 deletions compiler/src/dotty/tools/dotc/tastyreflect/TreeOpsImpl.scala
Expand Up @@ -236,12 +236,8 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
}

object Select extends SelectExtractor {
def unapply(x: Term)(implicit ctx: Context): Option[(Term, String, Option[Signature])] = x match {
case x: tpd.Select if x.isTerm =>
val sig =
if (x.symbol.signature == core.Signature.NotAMethod) None
else Some(x.symbol.signature)
Some((x.qualifier, x.name.toString, sig))
def unapply(x: Term)(implicit ctx: Context): Option[(Term, String)] = x match {
case x: tpd.Select if x.isTerm => Some((x.qualifier, x.name.toString))
case _ => None
}
}
Expand Down
26 changes: 13 additions & 13 deletions library/src/scala/tasty/reflect/Printers.scala
Expand Up @@ -101,8 +101,8 @@ trait Printers
def visitTree(x: Tree): Buffer = x match {
case Term.Ident(name) =>
this += "Term.Ident(\"" += name += "\")"
case Term.Select(qualifier, name, signature) =>
this += "Term.Select(" += qualifier += ", \"" += name += "\", " += signature += ")"
case Term.Select(qualifier, name) =>
this += "Term.Select(" += qualifier += ", \"" += name += "\")"
case Term.This(qual) =>
this += "Term.This(" += qual += ")"
case Term.Super(qual, mix) =>
Expand Down Expand Up @@ -522,8 +522,8 @@ trait Printers
}

val parents1 = parents.filter {
case IsTerm(Term.Apply(Term.Select(Term.New(tpt), _, _), _)) => !Types.JavaLangObject.unapply(tpt.tpe)
case IsTypeTree(TypeTree.Select(Term.Select(Term.Ident("_root_"), "scala", _), "Product")) => false
case IsTerm(Term.Apply(Term.Select(Term.New(tpt), _), _)) => !Types.JavaLangObject.unapply(tpt.tpe)
case IsTypeTree(TypeTree.Select(Term.Select(Term.Ident("_root_"), "scala"), "Product")) => false
case _ => true
}
if (parents1.nonEmpty)
Expand All @@ -538,7 +538,7 @@ trait Printers
case IsTerm(Term.Apply(fun, args)) =>
printParent(fun)
inParens(printTrees(args, ", "))
case IsTerm(Term.Select(Term.New(tpt), _, _)) =>
case IsTerm(Term.Select(Term.New(tpt), _)) =>
printTypeTree(tpt)
case IsTerm(parent) =>
throw new MatchError(parent.show)
Expand Down Expand Up @@ -678,7 +678,7 @@ trait Printers
case IsTerm(tree @ Term.Ident(_)) =>
printType(tree.tpe)

case Term.Select(qual, name, sig) =>
case Term.Select(qual, name) =>
printTree(qual)
if (name != "<init>" && name != "package")
this += "." += name
Expand Down Expand Up @@ -709,7 +709,7 @@ trait Printers

case Term.Apply(fn, args) =>
fn match {
case Term.Select(Term.This(_), "<init>", _) => this += "this" // call to constructor inside a constructor
case Term.Select(Term.This(_), "<init>") => this += "this" // call to constructor inside a constructor
case _ => printTree(fn)
}
val args1 = args match {
Expand All @@ -722,7 +722,7 @@ trait Printers
case Term.TypeApply(fn, args) =>
printTree(fn)
fn match {
case Term.Select(Term.New(TypeTree.Applied(_, _)), "<init>", _) =>
case Term.Select(Term.New(TypeTree.Applied(_, _)), "<init>") =>
// type bounds already printed in `fn`
this
case _ =>
Expand Down Expand Up @@ -853,7 +853,7 @@ trait Printers
next match {
case Term.Block(_, _) => this += doubleLineBreak()
case Term.Inlined(_, _, _) => this += doubleLineBreak()
case Term.Select(qual, _, _) => printSeparator(qual)
case Term.Select(qual, _) => printSeparator(qual)
case Term.Apply(fn, _) => printSeparator(fn)
case Term.TypeApply(fn, _) => printSeparator(fn)
case _ => this += lineBreak()
Expand Down Expand Up @@ -1141,8 +1141,8 @@ trait Printers

case Pattern.Unapply(fun, implicits, patterns) =>
fun match {
case Term.Select(extractor, "unapply" | "unapplySeq", _) => printTree(extractor)
case Term.TypeApply(Term.Select(extractor, "unapply" | "unapplySeq", _), _) => printTree(extractor)
case Term.Select(extractor, "unapply" | "unapplySeq") => printTree(extractor)
case Term.TypeApply(Term.Select(extractor, "unapply" | "unapplySeq"), _) => printTree(extractor)
case _ => throw new MatchError(fun.show)
}
inParens(printPatterns(patterns, ", "))
Expand Down Expand Up @@ -1611,8 +1611,8 @@ trait Printers
private object Annotation {
def unapply(arg: Tree)(implicit ctx: Context): Option[(TypeTree, List[Term])] = arg match {
case Term.New(annot) => Some((annot, Nil))
case Term.Apply(Term.Select(Term.New(annot), "<init>", _), args) => Some((annot, args))
case Term.Apply(Term.TypeApply(Term.Select(Term.New(annot), "<init>", _), targs), args) => Some((annot, args))
case Term.Apply(Term.Select(Term.New(annot), "<init>"), args) => Some((annot, args))
case Term.Apply(Term.TypeApply(Term.Select(Term.New(annot), "<init>"), targs), args) => Some((annot, args))
case _ => None
}
}
Expand Down
4 changes: 2 additions & 2 deletions library/src/scala/tasty/reflect/TreeOps.scala
Expand Up @@ -208,8 +208,8 @@ trait TreeOps extends Core {
/** Scala term selection */
val Select: SelectExtractor
abstract class SelectExtractor {
/** Matches `<qual: Term>.<name: String>: <sig: Option[Signature]>` */
def unapply(tree: Tree)(implicit ctx: Context): Option[(Term, String, Option[Signature])]
/** Matches `<qual: Term>.<name: String>` */
def unapply(tree: Tree)(implicit ctx: Context): Option[(Term, String)]
}

val IsLiteral: IsLiteralModule
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/tasty/reflect/TreeUtils.scala
Expand Up @@ -31,7 +31,7 @@ trait TreeUtils
tree match {
case Term.Ident(_) =>
x
case Term.Select(qualifier, _, _) =>
case Term.Select(qualifier, _) =>
foldTree(x, qualifier)
case Term.This(qual) =>
x
Expand Down
2 changes: 1 addition & 1 deletion semanticdb/src/dotty/semanticdb/SemanticdbConsumer.scala
Expand Up @@ -255,7 +255,7 @@ class SemanticdbConsumer extends TastyConsumer {
super.traverseTree(body)
}

case Term.Select(qualifier, _, _) => {
case Term.Select(qualifier, _) => {
val range = rangeExclude(tree.pos, qualifier.pos)
addOccurenceTree(tree, s.SymbolOccurrence.Role.REFERENCE, range)
super.traverseTree(tree)
Expand Down
2 changes: 1 addition & 1 deletion semanticdb/test/dotty/semanticdb/Tests.scala
Expand Up @@ -24,7 +24,7 @@ class TastyInspecter extends TastyConsumer {
case IsClassDef(cdef) => {
cdef.symbol.annots.foreach { annot =>
annot match {
case Term.Apply(Term.Select(Term.New(t), _, _),
case Term.Apply(Term.Select(Term.New(t), _),
List(Term.Literal(Constant.String(path))))
if t.symbol.name == "SourceFile" =>
// we found the path to a file. In this case, we do not need to
Expand Down
2 changes: 1 addition & 1 deletion tests/neg/tasty-macro-assert/quoted_1.scala
Expand Up @@ -33,7 +33,7 @@ object Asserts {
}

tree match {
case Term.Inlined(_, Nil, Term.Apply(Term.Select(OpsTree(left), op, _), right :: Nil)) =>
case Term.Inlined(_, Nil, Term.Apply(Term.Select(OpsTree(left), op), right :: Nil)) =>
'(assertTrue(~left.seal[Boolean])) // Buggy code. To generate the errors
case _ =>
'(assertTrue(~cond))
Expand Down
4 changes: 2 additions & 2 deletions tests/run-custom-args/Yretain-trees/tasty-definitions-2.check
@@ -1,3 +1,3 @@
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(3))))))
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+"), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+"), List(Term.Literal(Constant.Int(3))))))
Pattern.Bind("x", Pattern.Value(Term.Ident("_")))
4 changes: 2 additions & 2 deletions tests/run-custom-args/Yretain-trees/tasty-definitions-3.check
@@ -1,3 +1,3 @@
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(3))))))
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+"), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+"), List(Term.Literal(Constant.Int(3))))))
Pattern.Bind("x", Pattern.Value(Term.Ident("_")))
@@ -1,5 +1,5 @@
foo
DefDef("main", Nil, List(List(ValDef("args", TypeTree.Applied(TypeTree.Ident("Array"), List(TypeTree.Ident("String"))), None))), TypeTree.Ident("Unit"), Some(Term.Block(Nil, Term.Inlined(Some(TypeTree.Ident("Macros$")), Nil, Term.Typed(Term.Select(Term.Apply(Term.Apply(Term.TypeApply(Term.Ident("impl"), List(TypeTree.Inferred())), List(Term.Apply(Term.TypeApply(Term.Ident("apply"), List(TypeTree.Inferred())), List(Term.Inlined(None, Nil, Term.Block(List(DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred())))), ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred())))), ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>", Some(Signature(Nil, java.lang.Object))), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))), Term.Literal(Constant.Unit()))))))), List(Term.Ident("macroContext"))), "unary_~", Some(Signature(Nil, java.lang.Object))), TypeTree.Ident("Unit"))))))
DefDef("main", Nil, List(List(ValDef("args", TypeTree.Applied(TypeTree.Ident("Array"), List(TypeTree.Ident("String"))), None))), TypeTree.Ident("Unit"), Some(Term.Block(Nil, Term.Inlined(Some(TypeTree.Ident("Macros$")), Nil, Term.Typed(Term.Select(Term.Apply(Term.Apply(Term.TypeApply(Term.Ident("impl"), List(TypeTree.Inferred())), List(Term.Apply(Term.TypeApply(Term.Ident("apply"), List(TypeTree.Inferred())), List(Term.Inlined(None, Nil, Term.Block(List(DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred())))), ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred())))), ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))), Term.Literal(Constant.Unit()))))))), List(Term.Ident("macroContext"))), "unary_~"), TypeTree.Ident("Unit"))))))

bar
DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred()))))
Expand All @@ -8,7 +8,7 @@ bar2
DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred()))))

foo2
DefDef("main", Nil, List(List(ValDef("args", TypeTree.Applied(TypeTree.Ident("Array"), List(TypeTree.Ident("String"))), None))), TypeTree.Ident("Unit"), Some(Term.Block(Nil, Term.Inlined(Some(TypeTree.Ident("Macros$")), Nil, Term.Typed(Term.Select(Term.Apply(Term.Apply(Term.TypeApply(Term.Ident("impl"), List(TypeTree.Inferred())), List(Term.Apply(Term.TypeApply(Term.Ident("apply"), List(TypeTree.Inferred())), List(Term.Inlined(None, Nil, Term.Block(List(DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred())))), ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred())))), ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>", Some(Signature(Nil, java.lang.Object))), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))), Term.Literal(Constant.Unit()))))))), List(Term.Ident("macroContext"))), "unary_~", Some(Signature(Nil, java.lang.Object))), TypeTree.Ident("Unit"))))))
DefDef("main", Nil, List(List(ValDef("args", TypeTree.Applied(TypeTree.Ident("Array"), List(TypeTree.Ident("String"))), None))), TypeTree.Ident("Unit"), Some(Term.Block(Nil, Term.Inlined(Some(TypeTree.Ident("Macros$")), Nil, Term.Typed(Term.Select(Term.Apply(Term.Apply(Term.TypeApply(Term.Ident("impl"), List(TypeTree.Inferred())), List(Term.Apply(Term.TypeApply(Term.Ident("apply"), List(TypeTree.Inferred())), List(Term.Inlined(None, Nil, Term.Block(List(DefDef("foo", Nil, Nil, TypeTree.Inferred(), Some(Term.Block(List(DefDef("bar", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(1)))), ValDef("bar2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(2))))), Term.Typed(Term.Ident("bar"), TypeTree.Inferred())))), ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred())))), ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))), Term.Literal(Constant.Unit()))))))), List(Term.Ident("macroContext"))), "unary_~"), TypeTree.Ident("Unit"))))))

baz
ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred()))))
Expand All @@ -17,11 +17,11 @@ baz2
ValDef("foo2", TypeTree.Inferred(), Some(Term.Block(List(DefDef("baz", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(3)))), ValDef("baz2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(4))))), Term.Typed(Term.Ident("baz"), TypeTree.Inferred()))))

<init>
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>", Some(Signature(Nil, java.lang.Object))), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))

b
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>", Some(Signature(Nil, java.lang.Object))), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))

b2
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>", Some(Signature(Nil, java.lang.Object))), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), None, List(TypeDef("B", TypeTree.Ident("Int")), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))

4 changes: 2 additions & 2 deletions tests/run-custom-args/Yretain-trees/tasty-load-tree-1.check
@@ -1,2 +1,2 @@
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(3))))))
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+"), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+"), List(Term.Literal(Constant.Int(3))))))
4 changes: 2 additions & 2 deletions tests/run-custom-args/Yretain-trees/tasty-load-tree-2.check
@@ -1,2 +1,2 @@
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+", Some(Signature(List(scala.Int), scala.Int))), List(Term.Literal(Constant.Int(3))))))
DefDef("foo", Nil, Nil, TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(1)), "+"), List(Term.Literal(Constant.Int(2))))))
ValDef("bar", TypeTree.Ident("Int"), Some(Term.Apply(Term.Select(Term.Literal(Constant.Int(2)), "+"), List(Term.Literal(Constant.Int(3))))))

0 comments on commit 2ec79d1

Please sign in to comment.