From 9cd5c881fc13acbd9aca08fd6ae2830292e5f1b4 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 17 Feb 2015 16:02:49 +1000 Subject: Remove incorrect completions: implicits can't add type members The checkfile of the tests added in the last commit offered a type member from `RichInt` in the completions for the type `Int`. However, only term members can be extension methods; type members cannot. --- src/interactive/scala/tools/nsc/interactive/Global.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/interactive') diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala index e42a0fda0e..2d09435f60 100644 --- a/src/interactive/scala/tools/nsc/interactive/Global.scala +++ b/src/interactive/scala/tools/nsc/interactive/Global.scala @@ -1138,7 +1138,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) } } -- cgit v1.2.3