Skip to content

Commit 820e724

Browse files
committed
Some small doc changes
1 parent 8755d85 commit 820e724

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import SymDenotations._, Symbols._, StdNames._, Annotations._, Trees._
88
import CheckTrees._, Denotations._
99
import config.Printers._
1010

11+
/** Some creators for typed trees */
1112
object tpd extends Trees.Instance[Type] with TypedTreeInfo {
1213

1314
def Modifiers(sym: Symbol)(implicit ctx: Context): Modifiers = Modifiers(

src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,15 @@ trait Symbols { this: Context =>
203203
stub
204204
}
205205

206-
/** Create the local template dummy of given class `cls`. */
206+
/** Create the local template dummy of given class `cls`.
207+
* In a template
208+
*
209+
* trait T { val fld: Int; { val x: int = 2 }; val fld2 = { val y = 2; y }}
210+
*
211+
* the owner of `x` is the local dummy of the template. The owner of the local
212+
* dummy is then the class of the template itself. By contrast, the owner of `y`
213+
* would be `fld2`. There is a single local dummy per template.
214+
*/
207215
def newLocalDummy(cls: Symbol, coord: Coord = NoCoord) =
208216
newSymbol(cls, nme.localDummyName(cls), EmptyFlags, NoType)
209217

0 commit comments

Comments
 (0)