Skip to content

Commit 860d2bc

Browse files
committed
Move Staging before PostTyper
1 parent d101462 commit 860d2bc

File tree

7 files changed

+40
-38
lines changed

7 files changed

+40
-38
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Compiler {
3737
/** Phases dealing with the frontend up to trees ready for TASTY pickling */
3838
protected def frontendPhases: List[List[Phase]] =
3939
List(new FrontEnd) :: // Compiler frontend: scanner, parser, namer, typer
40+
List(new Staging) :: // Check PCP, heal quoted types and expand macros
4041
List(new sbt.ExtractDependencies) :: // Sends information on classes' dependencies to sbt via callbacks
4142
List(new PostTyper) :: // Additional checks and cleanups after type checking
4243
List(new sbt.ExtractAPI) :: // Sends a representation of the API of classes to sbt via callbacks
@@ -45,7 +46,6 @@ class Compiler {
4546

4647
/** Phases dealing with TASTY tree pickling and unpickling */
4748
protected def picklerPhases: List[List[Phase]] =
48-
List(new Staging) :: // Check PCP, heal quoted types and expand macros
4949
List(new Pickler) :: // Generate TASTY info
5050
List(new ReifyQuotes) :: // Turn quoted trees into explicit run-time data structures
5151
Nil

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -167,26 +167,6 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
167167
}
168168
}
169169

170-
/** 1. If we are in an inline method but not in a nested quote, mark the inline method
171-
* as a macro.
172-
*
173-
* 2. If selection is a quote or splice node, record that fact in the current compilation unit.
174-
*/
175-
private def handleMeta(sym: Symbol)(implicit ctx: Context): Unit = {
176-
177-
def markAsMacro(c: Context): Unit =
178-
if (c.owner eq c.outer.owner) markAsMacro(c.outer)
179-
else if (c.owner.isInlineMethod) {
180-
c.owner.setFlag(Macro)
181-
}
182-
else if (!c.outer.owner.is(Package)) markAsMacro(c.outer)
183-
184-
if (sym.isSplice || sym.isQuote) {
185-
markAsMacro(ctx)
186-
ctx.compilationUnit.needsStaging = true
187-
}
188-
}
189-
190170
private object dropInlines extends TreeMap {
191171
override def transform(tree: Tree)(implicit ctx: Context): Tree = tree match {
192172
case Inlined(call, _, _) =>
@@ -198,13 +178,11 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
198178
override def transform(tree: Tree)(implicit ctx: Context): Tree =
199179
try tree match {
200180
case tree: Ident if !tree.isType =>
201-
handleMeta(tree.symbol)
202181
tree.tpe match {
203182
case tpe: ThisType => This(tpe.cls).withSpan(tree.span)
204183
case _ => tree
205184
}
206185
case tree @ Select(qual, name) =>
207-
handleMeta(tree.symbol)
208186
if (name.isTypeName) {
209187
Checking.checkRealizable(qual.tpe, qual.posd)
210188
super.transform(tree)(ctx.addMode(Mode.Type))

compiler/src/dotty/tools/dotc/transform/Staging.scala

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Staging extends MacroTransform {
8181
}
8282

8383
override def run(implicit ctx: Context): Unit =
84-
if (ctx.compilationUnit.needsStaging) super.run(freshStagingContext)
84+
/*if (ctx.compilationUnit.needsStaging)*/ super.run(freshStagingContext)
8585

8686
protected def newTransformer(implicit ctx: Context): Transformer = new Transformer {
8787
override def transform(tree: tpd.Tree)(implicit ctx: Context): tpd.Tree =
@@ -194,10 +194,8 @@ class Staging extends MacroTransform {
194194
case Some(tpRef) => tpRef
195195
case _ => tree
196196
}
197-
case _: TypeTree | _: AppliedTypeTree | _: Apply | _: TypeApply | _: UnApply =>
197+
case _: TypeTree | _: AppliedTypeTree | _: Apply | _: TypeApply | _: UnApply | Select(_, OuterSelectName(_, _)) =>
198198
tree.withType(checkTp(tree.tpe))
199-
case Select(_, OuterSelectName(_, _)) =>
200-
tree.withType(checkTp(tree.tpe.widen))
201199
case _: ValOrDefDef | _: Bind =>
202200
tree.symbol.info = checkTp(tree.symbol.info)
203201
tree

compiler/src/dotty/tools/dotc/typer/Applications.scala

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,27 @@ object Applications {
185185
case _ => None
186186
}
187187
}
188+
189+
/** 1. If we are in an inline method but not in a nested quote, mark the inline method
190+
* as a macro.
191+
*
192+
* 2. If selection is a quote or splice node, record that fact in the current compilation unit.
193+
*/
194+
def handleMeta(tree: Tree)(implicit ctx: Context): tree.type = {
195+
import transform.SymUtils._
196+
197+
def markAsMacro(c: Context): Unit =
198+
if (c.owner eq c.outer.owner) markAsMacro(c.outer)
199+
else if (c.owner.isInlineMethod) c.owner.setFlag(Macro)
200+
else if (!c.outer.owner.is(Package)) markAsMacro(c.outer)
201+
val sym = tree.symbol
202+
if (sym.isSplice || sym.isQuote) {
203+
markAsMacro(ctx)
204+
ctx.compilationUnit.needsStaging = true
205+
}
206+
207+
tree
208+
}
188209
}
189210

190211
trait Applications extends Compatibility { self: Typer with Dynamic =>
@@ -753,7 +774,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
753774
* or, if application is an operator assignment, also an `Assign` or
754775
* Block node.
755776
*/
756-
def typedApply(tree: untpd.Apply, pt: Type)(implicit ctx: Context): Tree = {
777+
def typedApply(tree: untpd.Apply, pt: Type)(implicit ctx: Context): Tree = handleMeta {
757778

758779
def realApply(implicit ctx: Context): Tree = track("realApply") {
759780
val originalProto = new FunProto(tree.args, IgnoredProto(pt))(this, tree.isContextual)(argCtx(tree))
@@ -891,7 +912,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
891912
def typedTypeApply(tree: untpd.TypeApply, pt: Type)(implicit ctx: Context): Tree = track("typedTypeApply") {
892913
val isNamed = hasNamedArg(tree.args)
893914
val typedArgs = if (isNamed) typedNamedArgs(tree.args) else tree.args.mapconserve(typedType(_))
894-
typedExpr(tree.fun, PolyProto(typedArgs, pt)) match {
915+
handleMeta(typedExpr(tree.fun, PolyProto(typedArgs, pt)) match {
895916
case ExtMethodApply(app) =>
896917
app
897918
case _: TypeApply if !ctx.isAfterTyper =>
@@ -913,7 +934,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
913934
}
914935
if (typedFn.tpe eq TryDynamicCallType) tryDynamicTypeApply()
915936
else assignType(cpy.TypeApply(tree)(typedFn, typedArgs), typedFn, typedArgs)
916-
}
937+
})
917938
}
918939

919940
/** Rewrite `new Array[T](....)` if T is an unbounded generic to calls to newGenericArray.

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ class Typer extends Namer
439439
}
440440

441441
private def typedSelect(tree: untpd.Select, pt: Type, qual: Tree)(implicit ctx: Context): Select =
442-
checkValue(assignType(cpy.Select(tree)(qual, tree.name), qual), pt)
442+
Applications.handleMeta(checkValue(assignType(cpy.Select(tree)(qual, tree.name), qual), pt))
443443

444444
def typedSelect(tree: untpd.Select, pt: Type)(implicit ctx: Context): Tree = track("typedSelect") {
445445

@@ -1489,6 +1489,8 @@ class Typer extends Namer
14891489
val vdef1 = assignType(cpy.ValDef(vdef)(name, tpt1, rhs1), sym)
14901490
if (sym.is(Inline, butNot = DeferredOrTermParamOrAccessor))
14911491
checkInlineConformant(rhs1, isFinal = sym.is(Final), em"right-hand side of inline $sym")
1492+
if (sym.exists)
1493+
sym.defTree = vdef1
14921494
patchIfLazy(vdef1)
14931495
patchFinalVals(vdef1)
14941496
vdef1
@@ -1559,7 +1561,9 @@ class Typer extends Namer
15591561
for (param <- tparams1 ::: vparamss1.flatten)
15601562
checkRefsLegal(param, sym.owner, (name, sym) => sym.is(TypeParam), "secondary constructor")
15611563

1562-
assignType(cpy.DefDef(ddef)(name, tparams1, vparamss1, tpt1, rhs1), sym)
1564+
val ddef1 = assignType(cpy.DefDef(ddef)(name, tparams1, vparamss1, tpt1, rhs1), sym)
1565+
sym.defTree = ddef1
1566+
ddef1
15631567
//todo: make sure dependent method types do not depend on implicits or by-name params
15641568
}
15651569

compiler/src/dotty/tools/repl/ReplCompiler.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import dotty.tools.dotc.core.Phases.Phase
1212
import dotty.tools.dotc.core.StdNames._
1313
import dotty.tools.dotc.core.Symbols._
1414
import dotty.tools.dotc.reporting.diagnostic.messages
15-
import dotty.tools.dotc.transform.PostTyper
15+
import dotty.tools.dotc.transform.{PostTyper, Staging}
1616
import dotty.tools.dotc.typer.ImportInfo
1717
import dotty.tools.dotc.util.Spans._
1818
import dotty.tools.dotc.util.{ParsedComment, SourceFile}
@@ -34,6 +34,7 @@ class ReplCompiler extends Compiler {
3434
override protected def frontendPhases: List[List[Phase]] = List(
3535
List(new REPLFrontEnd),
3636
List(new CollectTopLevelImports),
37+
List(new Staging),
3738
List(new PostTyper)
3839
)
3940

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
foo
2-
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)), 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"))))))
2+
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(Term.Apply(Term.TypeApply(Term.Ident("printOwners"), List(TypeTree.Inferred())), List(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)), 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()))))), 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)), 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"))))))
33

44
bar
55
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()))))
@@ -8,7 +8,7 @@ bar2
88
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()))))
99

1010
foo2
11-
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)), 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"))))))
11+
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(Term.Apply(Term.TypeApply(Term.Ident("printOwners"), List(TypeTree.Inferred())), List(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)), 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()))))), 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)), 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"))))))
1212

1313
baz
1414
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()))))
@@ -17,11 +17,11 @@ baz2
1717
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()))))
1818

1919
<init>
20-
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), 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))))))
20+
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(TypeTree.Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(TypeTree.Inferred(), TypeTree.Inferred())), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
2121

2222
b
23-
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), 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))))))
23+
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(TypeTree.Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(TypeTree.Inferred(), TypeTree.Inferred())), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
2424

2525
b2
26-
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(Term.Apply(Term.Select(Term.New(TypeTree.Inferred()), "<init>"), Nil)), 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))))))
26+
ClassDef("A", DefDef("<init>", Nil, List(Nil), TypeTree.Inferred(), None), List(TypeTree.Inferred()), Nil, None, List(TypeDef("B", TypeBoundsTree(TypeTree.Inferred(), TypeTree.Inferred())), DefDef("b", Nil, Nil, TypeTree.Inferred(), Some(Term.Literal(Constant.Int(5)))), ValDef("b2", TypeTree.Inferred(), Some(Term.Literal(Constant.Int(6))))))
2727

0 commit comments

Comments
 (0)