summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-04-05 10:24:15 +0200
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-04-05 10:37:54 +0200
commit94b3dc83c44ed843a3aae67abf2b877669e63fe0 (patch)
tree44303e65d9c412c10a10947e0dcffc7f261667b5
parentbb4935e92c26778a1d1096cd5cd66812a9122f66 (diff)
downloadscala-94b3dc83c44ed843a3aae67abf2b877669e63fe0.tar.gz
scala-94b3dc83c44ed843a3aae67abf2b877669e63fe0.tar.bz2
scala-94b3dc83c44ed843a3aae67abf2b877669e63fe0.zip
avoid field init prob: make NoTreeAnnotation a def
-rw-r--r--src/compiler/scala/reflect/runtime/Universe.scala2
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Positions.scala2
-rw-r--r--src/library/scala/reflect/api/Positions.scala2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/reflect/runtime/Universe.scala b/src/compiler/scala/reflect/runtime/Universe.scala
index 7a5dda3d8e..dca6d6041b 100644
--- a/src/compiler/scala/reflect/runtime/Universe.scala
+++ b/src/compiler/scala/reflect/runtime/Universe.scala
@@ -40,7 +40,7 @@ class Universe extends SymbolTable {
definitions.AnyValClass // force it.
type TreeAnnotation = Position
- val NoTreeAnnotation: TreeAnnotation = NoPosition
+ def NoTreeAnnotation: TreeAnnotation = NoPosition
def positionToAnnotation(pos: Position): TreeAnnotation = pos // TODO
def annotationToPosition(annot: TreeAnnotation): Position = annot //TODO
diff --git a/src/compiler/scala/tools/nsc/symtab/Positions.scala b/src/compiler/scala/tools/nsc/symtab/Positions.scala
index 680b06f8ce..94b619de90 100644
--- a/src/compiler/scala/tools/nsc/symtab/Positions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Positions.scala
@@ -15,7 +15,7 @@ self: scala.tools.nsc.symtab.SymbolTable =>
val NoPosition = scala.tools.nsc.util.NoPosition
type TreeAnnotation = scala.tools.nsc.util.TreeAnnotation
- val NoTreeAnnotation: TreeAnnotation = NoPosition
+ def NoTreeAnnotation: TreeAnnotation = NoPosition
def positionToAnnotation(pos: Position): TreeAnnotation = pos
def annotationToPosition(annot: TreeAnnotation): Position = annot.pos
override def _checkSetAnnotation(tree: Tree, annot: TreeAnnotation): Unit = {
diff --git a/src/library/scala/reflect/api/Positions.scala b/src/library/scala/reflect/api/Positions.scala
index 4c8c33bec8..91f1081b4d 100644
--- a/src/library/scala/reflect/api/Positions.scala
+++ b/src/library/scala/reflect/api/Positions.scala
@@ -11,7 +11,7 @@ trait Positions { self: Universe =>
* Typically, positionToAnnotation is the identity, and annotationToPosition returns annot.pos
*/
type TreeAnnotation // <: { def pos: Position }
- val NoTreeAnnotation: TreeAnnotation
+ def NoTreeAnnotation: TreeAnnotation
implicit def positionToAnnotation(pos: Position): TreeAnnotation // = pos
def annotationToPosition(annot: TreeAnnotation): Position // = annot.pos
def _checkSetAnnotation(tree: Tree, annot: TreeAnnotation): Unit = () // check that annot may overwrite tree.annot