summaryrefslogtreecommitdiff
path: root/src/interactive/scala/tools/nsc/interactive/Global.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2015-09-09 19:38:29 +1000
committerJason Zaugg <jzaugg@gmail.com>2015-09-10 11:43:33 +1000
commit46211ddd07432f06d125d9926cd8b42bc7bfba40 (patch)
tree7d88848c175da100d0e70c4ed682c2ef354c8822 /src/interactive/scala/tools/nsc/interactive/Global.scala
parent0dbdaf8b1fb64806d35c18b362184293d46c89cb (diff)
downloadscala-46211ddd07432f06d125d9926cd8b42bc7bfba40.tar.gz
scala-46211ddd07432f06d125d9926cd8b42bc7bfba40.tar.bz2
scala-46211ddd07432f06d125d9926cd8b42bc7bfba40.zip
Fix completion for synthetic case modules and methods
I'm pretty sure the `isSynthetic` call added in 854de25ee6 should instead be `isArtifact`, so that's what I've implemented here. `isSynthetic` used to also filter out error symbols, which are created with the flags `SYNTHETIC | IS_ERROR`. I've added an addition test for `isError`, which was needed to keep the output of `presentation/scope-completion-import` unchanged. The checkfile for `presentation/callcc-interpreter` is modified to add the additional completion proposals: synthetic companion objects.
Diffstat (limited to 'src/interactive/scala/tools/nsc/interactive/Global.scala')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index 6c8719b5eb..d6be6331ce 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -1000,7 +1000,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
def add(sym: Symbol, pre: Type, implicitlyAdded: Boolean)(toMember: (Symbol, Type) => M) {
if ((sym.isGetter || sym.isSetter) && sym.accessed != NoSymbol) {
add(sym.accessed, pre, implicitlyAdded)(toMember)
- } else if (!sym.name.decodedName.containsName("$") && !sym.isSynthetic && sym.hasRawInfo) {
+ } else if (!sym.name.decodedName.containsName("$") && !sym.isError && !sym.isArtifact && sym.hasRawInfo) {
val symtpe = pre.memberType(sym) onTypeError ErrorType
matching(sym, symtpe, this(sym.name)) match {
case Some(m) =>