aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-14 19:05:51 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-16 10:58:20 +0100
commit820e7243da725388e7c866423a8e31b2a9cd5c17 (patch)
tree0fe04f1867c720f92f48fad1abfe09c59d795736 /src/dotty/tools
parent8755d8521e25e300edd8486958e6673e8b708f0e (diff)
downloaddotty-820e7243da725388e7c866423a8e31b2a9cd5c17.tar.gz
dotty-820e7243da725388e7c866423a8e31b2a9cd5c17.tar.bz2
dotty-820e7243da725388e7c866423a8e31b2a9cd5c17.zip
Some small doc changes
Diffstat (limited to 'src/dotty/tools')
-rw-r--r--src/dotty/tools/dotc/ast/tpd.scala1
-rw-r--r--src/dotty/tools/dotc/core/Symbols.scala10
2 files changed, 10 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/ast/tpd.scala b/src/dotty/tools/dotc/ast/tpd.scala
index a8da15bd7..8b9e0c12e 100644
--- a/src/dotty/tools/dotc/ast/tpd.scala
+++ b/src/dotty/tools/dotc/ast/tpd.scala
@@ -8,6 +8,7 @@ import SymDenotations._, Symbols._, StdNames._, Annotations._, Trees._
import CheckTrees._, Denotations._
import config.Printers._
+/** Some creators for typed trees */
object tpd extends Trees.Instance[Type] with TypedTreeInfo {
def Modifiers(sym: Symbol)(implicit ctx: Context): Modifiers = Modifiers(
diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala
index 4aa1ef94d..35ab8419e 100644
--- a/src/dotty/tools/dotc/core/Symbols.scala
+++ b/src/dotty/tools/dotc/core/Symbols.scala
@@ -203,7 +203,15 @@ trait Symbols { this: Context =>
stub
}
- /** Create the local template dummy of given class `cls`. */
+ /** Create the local template dummy of given class `cls`.
+ * In a template
+ *
+ * trait T { val fld: Int; { val x: int = 2 }; val fld2 = { val y = 2; y }}
+ *
+ * the owner of `x` is the local dummy of the template. The owner of the local
+ * dummy is then the class of the template itself. By contrast, the owner of `y`
+ * would be `fld2`. There is a single local dummy per template.
+ */
def newLocalDummy(cls: Symbol, coord: Coord = NoCoord) =
newSymbol(cls, nme.localDummyName(cls), EmptyFlags, NoType)