From 3f900c0eb19a4eeb6b04542c521202e3a9025524 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Mon, 15 Mar 2021 17:49:01 +0100 Subject: [PATCH] Remove reflect ClassDef defived --- .../quoted/runtime/impl/QuotesImpl.scala | 10 ++-- .../runtime/impl/printers/Extractors.scala | 4 +- .../runtime/impl/printers/SourceCode.scala | 11 ++--- library/src/scala/quoted/ExprMap.scala | 2 +- library/src/scala/quoted/Quotes.scala | 12 ++--- .../tasty-extractors-owners.check | 6 +-- tests/run-macros/exports.check | 2 +- tests/run-macros/tasty-extractors-2.check | 46 +++++++++---------- 8 files changed, 41 insertions(+), 52 deletions(-) diff --git a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala index 0a0df6a3f2b0..ca598a8567fb 100644 --- a/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala +++ b/compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala @@ -218,13 +218,13 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler end ClassDefTypeTest object ClassDef extends ClassDefModule: - def copy(original: Tree)(name: String, constr: DefDef, parents: List[Tree], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement]): ClassDef = { + def copy(original: Tree)(name: String, constr: DefDef, parents: List[Tree], selfOpt: Option[ValDef], body: List[Statement]): ClassDef = { val dotc.ast.Trees.TypeDef(_, originalImpl: tpd.Template) = original - tpd.cpy.TypeDef(original)(name.toTypeName, tpd.cpy.Template(originalImpl)(constr, parents, derived, selfOpt.getOrElse(tpd.EmptyValDef), body)) + tpd.cpy.TypeDef(original)(name.toTypeName, tpd.cpy.Template(originalImpl)(constr, parents, derived = Nil, selfOpt.getOrElse(tpd.EmptyValDef), body)) } - def unapply(cdef: ClassDef): (String, DefDef, List[Tree /* Term | TypeTree */], List[TypeTree], Option[ValDef], List[Statement]) = + def unapply(cdef: ClassDef): (String, DefDef, List[Tree /* Term | TypeTree */], Option[ValDef], List[Statement]) = val rhs = cdef.rhs.asInstanceOf[tpd.Template] - (cdef.name.toString, cdef.constructor, cdef.parents, rhs.derived.asInstanceOf[List[TypeTree]], cdef.self, rhs.body) + (cdef.name.toString, cdef.constructor, cdef.parents, cdef.self, rhs.body) end ClassDef given ClassDefMethods: ClassDefMethods with @@ -233,8 +233,6 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler self.rhs.asInstanceOf[tpd.Template].constr def parents: List[Tree] = self.rhs.asInstanceOf[tpd.Template].parents - def derived: List[TypeTree] = - self.rhs.asInstanceOf[tpd.Template].derived.asInstanceOf[List[TypeTree]] def self: Option[ValDef] = optional(self.rhs.asInstanceOf[tpd.Template].self) def body: List[Statement] = diff --git a/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala b/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala index 53de13d47f5c..b55ae6cbb166 100644 --- a/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala +++ b/compiler/src/scala/quoted/runtime/impl/printers/Extractors.scala @@ -121,11 +121,9 @@ object Extractors { this += "DefDef(\"" += name += "\", " ++= paramsClauses += ", " += returnTpt += ", " += rhs += ")" case TypeDef(name, rhs) => this += "TypeDef(\"" += name += "\", " += rhs += ")" - case ClassDef(name, constr, parents, derived, self, body) => + case ClassDef(name, constr, parents, self, body) => this += "ClassDef(\"" += name += "\", " += constr += ", " visitList[Tree](parents, visitTree) - this += ", " - visitList[TypeTree](derived, visitTree) this += ", " += self += ", " ++= body += ")" case Import(expr, selectors) => this += "Import(" += expr += ", " ++= selectors += ")" diff --git a/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala b/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala index 3cb5a19d980e..62fa24d908f1 100644 --- a/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala +++ b/compiler/src/scala/quoted/runtime/impl/printers/SourceCode.scala @@ -138,7 +138,7 @@ object SourceCode { this += "." printSelectors(selectors) - case cdef @ ClassDef(name, DefDef(_, paramss, _, _), parents, derived, self, stats) => + case cdef @ ClassDef(name, DefDef(_, paramss, _, _), parents, self, stats) => printDefAnnotations(cdef) val flags = cdef.symbol.flags @@ -202,11 +202,6 @@ object SourceCode { } printSeparated(parents1) - if (derived.nonEmpty) { - this += highlightKeyword(" derives ") - printTypeTrees(derived, ", ") - } - def keepDefinition(d: Definition): Boolean = { val flags = d.symbol.flags def isUndecompilableCaseClassMethod: Boolean = { @@ -847,7 +842,7 @@ object SourceCode { val name = splicedName(arg.symbol).getOrElse(arg.symbol.name) val sym = arg.symbol.owner if sym.isDefDef && sym.name == "" then - val ClassDef(_, _, _, _, _, body) = sym.owner.tree + val ClassDef(_, _, _, _, body) = sym.owner.tree body.collectFirst { case vdef @ ValDef(`name`, _, _) if vdef.symbol.flags.is(Flags.ParamAccessor) => if (!vdef.symbol.flags.is(Flags.Local)) { @@ -1253,7 +1248,7 @@ object SourceCode { private def printDefinitionName(tree: Definition): this.type = tree match { case ValDef(name, _, _) => this += highlightValDef(name) case DefDef(name, _, _, _) => this += highlightValDef(name) - case ClassDef(name, _, _, _, _, _) => this += highlightTypeDef(name.stripSuffix("$")) + case ClassDef(name, _, _, _, _) => this += highlightTypeDef(name.stripSuffix("$")) case TypeDef(name, _) => this += highlightTypeDef(name) } diff --git a/library/src/scala/quoted/ExprMap.scala b/library/src/scala/quoted/ExprMap.scala index 6f36a3a473e3..42c7f90570a1 100644 --- a/library/src/scala/quoted/ExprMap.scala +++ b/library/src/scala/quoted/ExprMap.scala @@ -34,7 +34,7 @@ trait ExprMap: tree case tree: ClassDef => val newBody = transformStats(tree.body)(owner) - ClassDef.copy(tree)(tree.name, tree.constructor, tree.parents, tree.derived, tree.self, newBody) + ClassDef.copy(tree)(tree.name, tree.constructor, tree.parents, tree.self, newBody) } } diff --git a/library/src/scala/quoted/Quotes.scala b/library/src/scala/quoted/Quotes.scala index 7ba3a5a37c6b..2b54a82f9e83 100644 --- a/library/src/scala/quoted/Quotes.scala +++ b/library/src/scala/quoted/Quotes.scala @@ -445,8 +445,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => /** Methods of the module object `val ClassDef` */ trait ClassDefModule { this: ClassDef.type => - def copy(original: Tree)(name: String, constr: DefDef, parents: List[Tree /* Term | TypeTree */], derived: List[TypeTree], selfOpt: Option[ValDef], body: List[Statement]): ClassDef - def unapply(cdef: ClassDef): (String, DefDef, List[Tree /* Term | TypeTree */], List[TypeTree], Option[ValDef], List[Statement]) + def copy(original: Tree)(name: String, constr: DefDef, parents: List[Tree /* Term | TypeTree */], selfOpt: Option[ValDef], body: List[Statement]): ClassDef + def unapply(cdef: ClassDef): (String, DefDef, List[Tree /* Term | TypeTree */], Option[ValDef], List[Statement]) } /** Makes extension methods on `ClassDef` available without any imports */ @@ -461,8 +461,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => * The first parent is always a class. */ def parents: List[Tree /* Term | TypeTree */] - /** List of derived type classes */ - def derived: List[TypeTree] // TODO remove? It seems these don't exist after desugaring /** Self-type of the class * * ```scala @@ -4214,9 +4212,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => case tdef @ TypeDef(_, rhs) => val owner = tdef.symbol foldTree(x, rhs)(owner) - case cdef @ ClassDef(_, constr, parents, derived, self, body) => + case cdef @ ClassDef(_, constr, parents, self, body) => val owner = cdef.symbol - foldTrees(foldTrees(foldTrees(foldTrees(foldTree(x, constr)(owner), parents)(owner), derived)(owner), self)(owner), body)(owner) + foldTrees(foldTrees(foldTrees(foldTree(x, constr)(owner), parents)(owner), self)(owner), body)(owner) case Import(expr, _) => foldTree(x, expr)(owner) case Export(expr, _) => @@ -4330,7 +4328,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching => val owner = tree.symbol TypeDef.copy(tree)(tree.name, transformTree(tree.rhs)(owner)) case tree: ClassDef => - ClassDef.copy(tree)(tree.name, tree.constructor, tree.parents, tree.derived, tree.self, tree.body) + ClassDef.copy(tree)(tree.name, tree.constructor, tree.parents, tree.self, tree.body) case tree: Import => Import.copy(tree)(transformTerm(tree.expr)(owner), tree.selectors) case tree: Export => diff --git a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners.check b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners.check index 678febe7dce2..982f8beec691 100644 --- a/tests/run-custom-args/Yretain-trees/tasty-extractors-owners.check +++ b/tests/run-custom-args/Yretain-trees/tasty-extractors-owners.check @@ -17,11 +17,11 @@ baz2 ValDef("foo2", Inferred(), None) -ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) +ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) b -ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) +ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) b2 -ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) +ClassDef("A", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), None, List(TypeDef("B", TypeBoundsTree(Inferred(), Inferred())), DefDef("b", Nil, Inferred(), None), ValDef("b2", Inferred(), None))) diff --git a/tests/run-macros/exports.check b/tests/run-macros/exports.check index f17ea798db1c..4010f4fa0041 100644 --- a/tests/run-macros/exports.check +++ b/tests/run-macros/exports.check @@ -11,6 +11,6 @@ reflection show: () } reflection show extractors: -Inlined(None, Nil, Block(List(ValDef("Observer", TypeIdent("Observer$"), Some(Apply(Select(New(TypeIdent("Observer$")), ""), Nil))), ClassDef("Observer$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, Some(ValDef("_", Singleton(Ident("Observer")), None)), List(Export(Ident("Messages"), List(SimpleSelector(count))), DefDef("count", Nil, Inferred(), Some(Select(Ident("Messages"), "count")))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ValDef("Observer", TypeIdent("Observer$"), Some(Apply(Select(New(TypeIdent("Observer$")), ""), Nil))), ClassDef("Observer$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Some(ValDef("_", Singleton(Ident("Observer")), None)), List(Export(Ident("Messages"), List(SimpleSelector(count))), DefDef("count", Nil, Inferred(), Some(Select(Ident("Messages"), "count")))))), Literal(UnitConstant()))) visited exports with splice visited exports with splice inverted diff --git a/tests/run-macros/tasty-extractors-2.check b/tests/run-macros/tasty-extractors-2.check index 3fa60370e850..d7572ef7f5b2 100644 --- a/tests/run-macros/tasty-extractors-2.check +++ b/tests/run-macros/tasty-extractors-2.check @@ -22,10 +22,10 @@ AndType(TypeRef(ThisType(TypeRef(NoPrefix(), "")), "Foo"), TypeRef(ThisTy Inlined(None, Nil, Typed(Literal(IntConstant(1)), Applied(TypeIdent("|"), List(TypeIdent("Int"), TypeIdent("String"))))) OrType(TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "")), "scala"), "Int"), TypeRef(TermRef(ThisType(TypeRef(NoPrefix(), "scala")), "Predef"), "String")) -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, Nil)), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, Nil)), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ValDef("Foo", TypeIdent("Foo$"), Some(Apply(Select(New(TypeIdent("Foo$")), ""), Nil))), ClassDef("Foo$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, Some(ValDef("_", Singleton(Ident("Foo")), None)), Nil)), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ValDef("Foo", TypeIdent("Foo$"), Some(Apply(Select(New(TypeIdent("Foo$")), ""), Nil))), ClassDef("Foo$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Some(ValDef("_", Singleton(Ident("Foo")), None)), Nil)), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") Inlined(None, Nil, Block(List(TypeDef("Foo", TypeBoundsTree(Inferred(), Inferred()))), Literal(UnitConstant()))) @@ -37,67 +37,67 @@ TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") Inlined(None, Nil, Block(List(TypeDef("Foo", TypeBoundsTree(TypeIdent("Null"), TypeIdent("Object")))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(0)))), DefDef("a_=", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Inferred(), Some(Literal(UnitConstant())))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(0)))), DefDef("a_=", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Inferred(), Some(Literal(UnitConstant())))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(DefDef("a", Nil, Inferred(), Some(Literal(IntConstant(0))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), TypeSelect(Select(Ident("_root_"), "scala"), "Product"), TypeSelect(Select(Ident("_root_"), "scala"), "Serializable")), Nil, None, List(DefDef("hashCode", List(TermParamClause(Nil)), Inferred(), Some(Apply(Ident("_hashCode"), List(This(Some("Foo")))))), DefDef("equals", List(TermParamClause(List(ValDef("x$0", Inferred(), None)))), Inferred(), Some(Apply(Select(Apply(Select(This(Some("Foo")), "eq"), List(TypeApply(Select(Ident("x$0"), "$asInstanceOf$"), List(Inferred())))), "||"), List(Match(Ident("x$0"), List(CaseDef(Bind("x$0", Typed(Ident("_"), Inferred())), None, Apply(Select(Literal(BooleanConstant(true)), "&&"), List(Apply(Select(Ident("x$0"), "canEqual"), List(This(Some("Foo"))))))), CaseDef(Ident("_"), None, Literal(BooleanConstant(false))))))))), DefDef("toString", List(TermParamClause(Nil)), Inferred(), Some(Apply(Ident("_toString"), List(This(Some("Foo")))))), DefDef("canEqual", List(TermParamClause(List(ValDef("that", Inferred(), None)))), Inferred(), Some(TypeApply(Select(Ident("that"), "isInstanceOf"), List(Inferred())))), DefDef("productArity", Nil, Inferred(), Some(Literal(IntConstant(0)))), DefDef("productPrefix", Nil, Inferred(), Some(Literal(StringConstant("Foo")))), DefDef("productElement", List(TermParamClause(List(ValDef("n", Inferred(), None)))), Inferred(), Some(Match(Ident("n"), List(CaseDef(Ident("_"), None, Apply(Ident("throw"), List(Apply(Select(New(Inferred()), ""), List(Apply(Select(Ident("n"), "toString"), Nil)))))))))), DefDef("productElementName", List(TermParamClause(List(ValDef("n", Inferred(), None)))), Inferred(), Some(Match(Ident("n"), List(CaseDef(Ident("_"), None, Apply(Ident("throw"), List(Apply(Select(New(Inferred()), ""), List(Apply(Select(Ident("n"), "toString"), Nil)))))))))), DefDef("copy", List(TermParamClause(Nil)), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil))))), ValDef("Foo", TypeIdent("Foo$"), Some(Apply(Select(New(TypeIdent("Foo$")), ""), Nil))), ClassDef("Foo$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), Inferred()), Nil, Some(ValDef("_", Singleton(Ident("Foo")), None)), List(DefDef("apply", List(TermParamClause(Nil)), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil))), DefDef("unapply", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Singleton(Literal(BooleanConstant(true))), Some(Literal(BooleanConstant(true)))), DefDef("toString", Nil, Inferred(), Some(Literal(StringConstant("Foo")))), TypeDef("MirroredMonoType", TypeBoundsTree(Inferred(), Inferred())), DefDef("fromProduct", List(TermParamClause(List(ValDef("x$0", Inferred(), None)))), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil)))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), TypeSelect(Select(Ident("_root_"), "scala"), "Product"), TypeSelect(Select(Ident("_root_"), "scala"), "Serializable")), None, List(DefDef("hashCode", List(TermParamClause(Nil)), Inferred(), Some(Apply(Ident("_hashCode"), List(This(Some("Foo")))))), DefDef("equals", List(TermParamClause(List(ValDef("x$0", Inferred(), None)))), Inferred(), Some(Apply(Select(Apply(Select(This(Some("Foo")), "eq"), List(TypeApply(Select(Ident("x$0"), "$asInstanceOf$"), List(Inferred())))), "||"), List(Match(Ident("x$0"), List(CaseDef(Bind("x$0", Typed(Ident("_"), Inferred())), None, Apply(Select(Literal(BooleanConstant(true)), "&&"), List(Apply(Select(Ident("x$0"), "canEqual"), List(This(Some("Foo"))))))), CaseDef(Ident("_"), None, Literal(BooleanConstant(false))))))))), DefDef("toString", List(TermParamClause(Nil)), Inferred(), Some(Apply(Ident("_toString"), List(This(Some("Foo")))))), DefDef("canEqual", List(TermParamClause(List(ValDef("that", Inferred(), None)))), Inferred(), Some(TypeApply(Select(Ident("that"), "isInstanceOf"), List(Inferred())))), DefDef("productArity", Nil, Inferred(), Some(Literal(IntConstant(0)))), DefDef("productPrefix", Nil, Inferred(), Some(Literal(StringConstant("Foo")))), DefDef("productElement", List(TermParamClause(List(ValDef("n", Inferred(), None)))), Inferred(), Some(Match(Ident("n"), List(CaseDef(Ident("_"), None, Apply(Ident("throw"), List(Apply(Select(New(Inferred()), ""), List(Apply(Select(Ident("n"), "toString"), Nil)))))))))), DefDef("productElementName", List(TermParamClause(List(ValDef("n", Inferred(), None)))), Inferred(), Some(Match(Ident("n"), List(CaseDef(Ident("_"), None, Apply(Ident("throw"), List(Apply(Select(New(Inferred()), ""), List(Apply(Select(Ident("n"), "toString"), Nil)))))))))), DefDef("copy", List(TermParamClause(Nil)), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil))))), ValDef("Foo", TypeIdent("Foo$"), Some(Apply(Select(New(TypeIdent("Foo$")), ""), Nil))), ClassDef("Foo$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), Inferred()), Some(ValDef("_", Singleton(Ident("Foo")), None)), List(DefDef("apply", List(TermParamClause(Nil)), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil))), DefDef("unapply", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Singleton(Literal(BooleanConstant(true))), Some(Literal(BooleanConstant(true)))), DefDef("toString", Nil, Inferred(), Some(Literal(StringConstant("Foo")))), TypeDef("MirroredMonoType", TypeBoundsTree(Inferred(), Inferred())), DefDef("fromProduct", List(TermParamClause(List(ValDef("x$0", Inferred(), None)))), Inferred(), Some(Apply(Select(New(Inferred()), ""), Nil)))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo1", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None)))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo1", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None)))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo2", DefDef("", List(TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo2", DefDef("", List(TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo3", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None))), ValDef("Foo3", TypeIdent("Foo3$"), Some(Apply(Select(New(TypeIdent("Foo3$")), ""), Nil))), ClassDef("Foo3$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, Some(ValDef("_", Singleton(Ident("Foo3")), None)), List(DefDef("$lessinit$greater$default$1", Nil, Inferred(), Some(Literal(IntConstant(5))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo3", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None))), ValDef("Foo3", TypeIdent("Foo3$"), Some(Apply(Select(New(TypeIdent("Foo3$")), ""), Nil))), ClassDef("Foo3$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Some(ValDef("_", Singleton(Ident("Foo3")), None)), List(DefDef("$lessinit$greater$default$1", Nil, Inferred(), Some(Literal(IntConstant(5))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo4", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo4", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo5", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None))), ValDef("Foo5", TypeIdent("Foo5$"), Some(Apply(Select(New(TypeIdent("Foo5$")), ""), Nil))), ClassDef("Foo5$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, Some(ValDef("_", Singleton(Ident("Foo5")), None)), List(DefDef("$lessinit$greater$default$2", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), Some(Ident("a")))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo5", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None))), ValDef("Foo5", TypeIdent("Foo5$"), Some(Apply(Select(New(TypeIdent("Foo5$")), ""), Nil))), ClassDef("Foo5$", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Some(ValDef("_", Singleton(Ident("Foo5")), None)), List(DefDef("$lessinit$greater$default$2", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), Some(Ident("a")))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo6", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", Singleton(Ident("a")), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo6", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None))), TermParamClause(List(ValDef("b", Singleton(Ident("a")), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None), ValDef("b", Inferred(), None)))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo7", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), None), DefDef("", List(TermParamClause(Nil)), Inferred(), Some(Block(List(Apply(Select(This(Some("Foo7")), ""), List(Literal(IntConstant(6))))), Literal(UnitConstant()))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo7", DefDef("", List(TermParamClause(List(ValDef("a", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), None), DefDef("", List(TermParamClause(Nil)), Inferred(), Some(Block(List(Apply(Select(This(Some("Foo7")), ""), List(Literal(IntConstant(6))))), Literal(UnitConstant()))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo8", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(Apply(Ident("println"), List(Literal(IntConstant(0))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo8", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(Apply(Ident("println"), List(Literal(IntConstant(0))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo10", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(9))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo10", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(9))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo11", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(10)))), DefDef("a_=", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Inferred(), Some(Literal(UnitConstant())))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo11", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(10)))), DefDef("a_=", List(TermParamClause(List(ValDef("x$1", Inferred(), None)))), Inferred(), Some(Literal(UnitConstant())))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo12", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(11))))))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo12", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("a", Inferred(), Some(Literal(IntConstant(11))))))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, Nil), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(TypeIdent("Foo")), ""), Nil)), Nil, None, Nil)), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, Nil), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(TypeIdent("Foo")), ""), Nil)), None, Nil)), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo2", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), Nil, None, Nil), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), TypeIdent("Foo2")), Nil, None, Nil)), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo2", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Inferred()), None, Nil), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil), TypeIdent("Foo2")), None, Nil)), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(List(ValDef("i", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(ValDef("i", Inferred(), None))), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(TypeIdent("Foo")), ""), List(Literal(IntConstant(1))))), Nil, None, Nil)), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(List(ValDef("i", TypeIdent("Int"), None)))), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(ValDef("i", Inferred(), None))), ClassDef("Bar", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(TypeIdent("Foo")), ""), List(Literal(IntConstant(1))))), None, Nil)), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(TypeDef("X", TypeIdent("Int")))), DefDef("f", List(TermParamClause(List(ValDef("a", TypeIdent("Foo"), None)))), TypeSelect(Ident("a"), "X"), Some(Ident("???")))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(TypeDef("X", TypeIdent("Int")))), DefDef("f", List(TermParamClause(List(ValDef("a", TypeIdent("Foo"), None)))), TypeSelect(Ident("a"), "X"), Some(Ident("???")))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") -Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), Nil, None, List(TypeDef("X", TypeBoundsTree(Inferred(), Inferred())))), DefDef("f", List(TermParamClause(List(ValDef("a", Refined(TypeIdent("Foo"), List(TypeDef("X", TypeIdent("Int")))), None)))), TypeSelect(Ident("a"), "X"), Some(Ident("???")))), Literal(UnitConstant()))) +Inlined(None, Nil, Block(List(ClassDef("Foo", DefDef("", List(TermParamClause(Nil)), Inferred(), None), List(Apply(Select(New(Inferred()), ""), Nil)), None, List(TypeDef("X", TypeBoundsTree(Inferred(), Inferred())))), DefDef("f", List(TermParamClause(List(ValDef("a", Refined(TypeIdent("Foo"), List(TypeDef("X", TypeIdent("Int")))), None)))), TypeSelect(Ident("a"), "X"), Some(Ident("???")))), Literal(UnitConstant()))) TypeRef(ThisType(TypeRef(NoPrefix(), "scala")), "Unit") Inlined(None, Nil, Block(List(ValDef("lambda", Applied(Inferred(), List(TypeIdent("Int"), TypeIdent("Int"))), Some(Block(List(DefDef("$anonfun", List(TermParamClause(List(ValDef("x", Inferred(), None)))), Inferred(), Some(Ident("x")))), Closure(Ident("$anonfun"), None))))), Literal(UnitConstant())))