From 820e7243da725388e7c866423a8e31b2a9cd5c17 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 14 Feb 2014 19:05:51 +0100 Subject: Some small doc changes --- src/dotty/tools/dotc/core/Symbols.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/Symbols.scala') 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) -- cgit v1.2.3