aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-02-29 17:21:28 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-02-29 17:22:14 +0100
commit561915336d652c41bf196a190c5847cf27a26506 (patch)
tree0d9fc20d906b259b3b9f0322ef2b324ed0da45b1 /src/dotty/tools/dotc/core/Types.scala
parentba67e556271156c11f5f313f68891bf18f7a51d2 (diff)
downloaddotty-561915336d652c41bf196a190c5847cf27a26506.tar.gz
dotty-561915336d652c41bf196a190c5847cf27a26506.tar.bz2
dotty-561915336d652c41bf196a190c5847cf27a26506.zip
Make Types#membersBasedOnFlags safer and faster
By filtering excluded flags earlier, we avoid forcing some denotations.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index da3b76c57..91913b935 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -612,7 +612,7 @@ object Types {
/** The set of members of this type having at least one of `requiredFlags` but none of `excludedFlags` set */
final def membersBasedOnFlags(requiredFlags: FlagSet, excludedFlags: FlagSet)(implicit ctx: Context): Seq[SingleDenotation] = track("implicitMembers") {
memberDenots(takeAllFilter,
- (name, buf) => buf ++= member(name).altsWith(x => x.is(requiredFlags, butNot = excludedFlags)))
+ (name, buf) => buf ++= memberExcluding(name, excludedFlags).altsWith(x => x.is(requiredFlags)))
}
/** The info of `sym`, seen as a member of this type. */