summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-04-01 16:47:22 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-04-01 16:47:22 +0200
commitdcd9a83916f9e0128ef6869def82d4f23bdea0e0 (patch)
treee58331aebe8ba06fd1c15faf36fdbb3f77b489b9 /src/interactive
parentebf0976c363c67e6a46c66d70b39704f1ce5e74a (diff)
parentfcc20fe4d3ac5caceb50965bc202b880e61f984c (diff)
downloadscala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.tar.gz
scala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.tar.bz2
scala-dcd9a83916f9e0128ef6869def82d4f23bdea0e0.zip
Merge commit 'fcc20fe' into merge/2.11-to-2.12-apr-1
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/ContextTrees.scala6
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala5
2 files changed, 7 insertions, 4 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/ContextTrees.scala b/src/interactive/scala/tools/nsc/interactive/ContextTrees.scala
index bf718c27cc..a4cb3efa4f 100644
--- a/src/interactive/scala/tools/nsc/interactive/ContextTrees.scala
+++ b/src/interactive/scala/tools/nsc/interactive/ContextTrees.scala
@@ -55,7 +55,11 @@ trait ContextTrees { self: Global =>
context
}
}
- locateContextTree(contexts, pos) map locateFinestContextTree map (_.context)
+ def sanitizeContext(c: Context): Context = {
+ c.retyping = false
+ c
+ }
+ locateContextTree(contexts, pos) map locateFinestContextTree map (ct => sanitizeContext(ct.context))
}
/** Returns the ContextTree containing `pos`, or the ContextTree positioned just before `pos`,
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index 3f963730f1..b6290eb3d3 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -154,7 +154,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
// don't keep the original owner in presentation compiler runs
// (the map will grow indefinitely, and the only use case is the backend)
- override protected def saveOriginalOwner(sym: Symbol) { }
+ override def defineOriginalOwner(sym: Symbol, owner: Symbol): Unit = { }
override def forInteractive = true
override protected def synchronizeNames = true
@@ -1073,7 +1073,6 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
case t => t
}
val context = doLocateContext(pos)
-
val shouldTypeQualifier = tree0.tpe match {
case null => true
case mt: MethodType => mt.isImplicit
@@ -1128,7 +1127,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
for (view <- applicableViews) {
val vtree = viewApply(view)
val vpre = stabilizedType(vtree)
- for (sym <- vtree.tpe.members) {
+ for (sym <- vtree.tpe.members if sym.isTerm) {
addTypeMember(sym, vpre, inherited = false, view.tree.symbol)
}
}