summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/scala-compiler.jar.desired.sha12
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala8
-rw-r--r--src/compiler/scala/tools/nsc/interactive/REPL.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala18
4 files changed, 25 insertions, 5 deletions
diff --git a/lib/scala-compiler.jar.desired.sha1 b/lib/scala-compiler.jar.desired.sha1
index c8411798da..a9efcfe011 100644
--- a/lib/scala-compiler.jar.desired.sha1
+++ b/lib/scala-compiler.jar.desired.sha1
@@ -1 +1 @@
-afc3f80c6b9d6b40428eaa79dc889fab303182ba ?scala-compiler.jar
+91d31d91a1dcebb045af5e171974751fef282a84 ?scala-compiler.jar
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 03f631a7e4..2f8b13537d 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -395,7 +395,9 @@ self =>
if (unit.status == NotLoaded || unit.status == PartiallyChecked) reloadSources(sources)
moveToFront(sources)
val typedTree = currentTyperRun.typedTreeAt(pos)
- new Locator(pos) locateIn typedTree
+ val result = new Locator(pos) locateIn typedTree
+ reloadSources(sources)
+ result
}
/** A fully attributed tree corresponding to the entire compilation unit */
@@ -405,7 +407,9 @@ self =>
val sources = List(source)
if (unit.status == NotLoaded || unit.status == PartiallyChecked || forceReload) reloadSources(sources)
moveToFront(sources)
- currentTyperRun.typedTree(unitOf(source))
+ val result = currentTyperRun.typedTree(unitOf(source))
+ reloadSources(sources)
+ result
}
/** Set sync var `response` to a fully attributed tree located at position `pos` */
diff --git a/src/compiler/scala/tools/nsc/interactive/REPL.scala b/src/compiler/scala/tools/nsc/interactive/REPL.scala
index f4c9a7effe..834747c547 100644
--- a/src/compiler/scala/tools/nsc/interactive/REPL.scala
+++ b/src/compiler/scala/tools/nsc/interactive/REPL.scala
@@ -112,7 +112,7 @@ object REPL {
Thread.sleep(millis.toInt)
println("ask type now")
comp.askType(toSourceFile(file), false, typedResult)
- show(typedResult)
+ typedResult.get
case List("typed", file) =>
doTypedTree(file)
case List("typeat", file, off1, off2) =>
diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
index 09544e6ab4..7982617fee 100644
--- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
@@ -368,7 +368,23 @@ trait NamesDefaults { self: Analyzer =>
val defaultArgs = missing map (p => {
var default1 = qual match {
case Some(q) => gen.mkAttributedSelect(q.duplicate, defaultGetter(p, context))
- case None => gen.mkAttributedRef(defaultGetter(p, context))
+ case None =>
+ val dgetter = defaultGetter(p, context)
+ if (dgetter == NoSymbol) {
+ println("no getter for "+p+" in "+p.owner)
+ println(p.owner.paramss)
+ var ctx = context
+ while (ctx.owner != p.owner.owner) {
+ println("inner scope: "+ctx.scope+ctx.scope.hashCode+" "+ctx.owner)
+ ctx = ctx.outer
+ }
+ while (ctx.owner == p.owner.owner) {
+ println("this scope: "+ctx.scope+ctx.scope.hashCode+" "+ctx.owner)
+ ctx = ctx.outer
+ }
+ }
+ gen.mkAttributedRef(dgetter)
+
}
default1 = if (targs.isEmpty) default1
else TypeApply(default1, targs.map(_.duplicate))