aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-12-15 12:26:04 +0100
committerMartin Odersky <odersky@gmail.com>2013-12-15 12:26:04 +0100
commit99393624e3bf001a6c20c7615ac88ef4201a93f8 (patch)
tree1f3a8800364fcfb1001b08a335acdfe8fa288c01 /src/dotty/tools/dotc/typer/Namer.scala
parent01db9a68e5e68f08c8236c23c905009789d51587 (diff)
downloaddotty-99393624e3bf001a6c20c7615ac88ef4201a93f8.tar.gz
dotty-99393624e3bf001a6c20c7615ac88ef4201a93f8.tar.bz2
dotty-99393624e3bf001a6c20c7615ac88ef4201a93f8.zip
Fixes related to SAM types.
1. Changes to SAMType extractor 2. Self names are no longer members of enclosing class 3. SAM-Type closures now print with their result type. 4. refactoring newSkolemSingleon ==> narrow
Diffstat (limited to 'src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Namer.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Namer.scala b/src/dotty/tools/dotc/typer/Namer.scala
index 3ddd3980b..9627065b2 100644
--- a/src/dotty/tools/dotc/typer/Namer.scala
+++ b/src/dotty/tools/dotc/typer/Namer.scala
@@ -229,7 +229,8 @@ class Namer { typer: Typer =>
def inClassContext(selfInfo: DotClass /* Should be Type | Symbol*/)(implicit ctx: Context): Context = {
val localCtx: Context = ctx.fresh.withNewScope
selfInfo match {
- case sym: Symbol if sym.exists && sym.name != nme.WILDCARD => localCtx.enter(sym)
+ case sym: Symbol if sym.exists && sym.name != nme.WILDCARD =>
+ localCtx.scope.asInstanceOf[MutableScope].enter(sym)
case _ =>
}
localCtx
@@ -409,7 +410,7 @@ class Namer { typer: Typer =>
tp & itpe
}
}
- // println(s"final inherited for $sym: ${inherited.toString}") !!!
+ // println(s"final inherited for $sym: ${inherited.toString}") !!!
// println(s"owner = ${sym.owner}, decls = ${sym.owner.info.decls.show}")
def rhsType = adapt(typedAheadExpr(mdef.rhs), WildcardType).tpe.widen
def lhsType = fullyDefinedType(rhsType, "right-hand side", mdef.pos)