Permalink
Browse files

make treeInfo more globally visible

  • Loading branch information...
1 parent ea681ec commit 97d5179127e02af39b19076e78e4b2bc099eef94 @adriaanm adriaanm committed May 16, 2013
View
2 src/reflect/scala/reflect/internal/SymbolTable.scala
@@ -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)
View
2 src/reflect/scala/reflect/internal/Symbols.scala
@@ -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
View
5 src/reflect/scala/reflect/runtime/JavaUniverse.scala
@@ -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.