Skip to content

Commit c5c0b13

Browse files
author
Adriaan Moors
committed
workaround for bug in self type escape checks
1 parent ea8026f commit c5c0b13

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ abstract class TreeBuilder {
234234
else CompoundTypeTree(Template(tps, emptyValDef, Nil))
235235

236236
/** Captures the difference in tree building between virtualized and non-virtualized scala */
237-
private abstract class TreeBuilderStrategy {
237+
// private commented out since it cause "error: private class TreeBuilderStrategy escapes its defining scope as part of type TreeBuilder.this.TreeBuilderStrategy"
238+
/*private <-- BUG*/ abstract class TreeBuilderStrategy {
238239
/** Create a tree representing an assignment <lhs = rhs> */
239240
def makeAssign(lhs: Tree, rhs: Tree): Tree
240241

@@ -284,7 +285,7 @@ abstract class TreeBuilder {
284285
@inline final def makeApply(sel: Tree, exprs: List[Tree]): Tree = builder.makeApply(sel, exprs)
285286

286287
// build trees for plain vanilla scala
287-
private class DirectTreeBuilder extends TreeBuilderStrategy {
288+
/*private <-- BUG*/ class DirectTreeBuilder extends TreeBuilderStrategy {
288289
/** Create a tree representing an assignment <lhs = rhs> */
289290
def makeAssign(lhs: Tree, rhs: Tree): Tree = lhs match {
290291
case Apply(fn, args) =>
@@ -327,7 +328,7 @@ abstract class TreeBuilder {
327328
}
328329

329330
// build trees for virtualized scala
330-
private class VirtualizingTreeBuilder extends TreeBuilderStrategy {
331+
/*private <-- BUG*/ class VirtualizingTreeBuilder extends TreeBuilderStrategy {
331332
/** Create a tree representing an assignment <lhs = rhs> */
332333
def makeAssign(lhs: Tree, rhs: Tree): Tree = lhs match {
333334
case Apply(fn, args) =>

0 commit comments

Comments
 (0)