Skip to content

Commit

Permalink
make treeInfo more globally visible
Browse files Browse the repository at this point in the history
  • Loading branch information
adriaanm committed May 16, 2013
1 parent ea681ec commit 97d5179
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reflect/scala/reflect/internal/SymbolTable.scala
Expand Up @@ -126,6 +126,8 @@ abstract class SymbolTable extends macros.Universe
val global: SymbolTable.this.type = SymbolTable.this
} with util.TraceSymbolActivity

val treeInfo: TreeInfo { val global: SymbolTable.this.type }

/** Check that the executing thread is the compiler thread. No-op here,
* overridden in interactive.Global. */
@elidable(elidable.WARNING)
Expand Down
2 changes: 2 additions & 0 deletions src/reflect/scala/reflect/internal/Symbols.scala
Expand Up @@ -92,6 +92,8 @@ trait Symbols extends api.Symbols { self: SymbolTable =>

def isExistential: Boolean = this.isExistentiallyBound
def isParamWithDefault: Boolean = this.hasDefault
// `isByNameParam` is only true for a call-by-name parameter of a *method*,
// an argument of the primary constructor seen in the class body is excluded by `isValueParameter`
def isByNameParam: Boolean = this.isValueParameter && (this hasFlag BYNAMEPARAM)
def isImplementationArtifact: Boolean = (this hasFlag BRIDGE) || (this hasFlag VBRIDGE) || (this hasFlag ARTIFACT)
def isJava: Boolean = isJavaDefined
Expand Down
5 changes: 5 additions & 0 deletions src/reflect/scala/reflect/runtime/JavaUniverse.scala
Expand Up @@ -21,5 +21,10 @@ class JavaUniverse extends internal.SymbolTable with ReflectSetup with runtime.S
def newStrictTreeCopier: TreeCopier = new StrictTreeCopier
def newLazyTreeCopier: TreeCopier = new LazyTreeCopier

// can't put this in runtime.Trees since that's mixed with Global in ReflectGlobal, which has the definition from internal.Trees
object treeInfo extends {
val global: JavaUniverse.this.type = JavaUniverse.this
} with internal.TreeInfo

init()
}

0 comments on commit 97d5179

Please sign in to comment.