aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-21 18:43:27 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-21 18:43:38 +0100
commite7b045a2fa9b1196465b388393ab23ce5979616e (patch)
tree7961fc0a7a7853f708f2fc06fa4cc54688b78013 /compiler/src/dotty/tools/dotc/core/Types.scala
parent098c50ac83eb4d18b23a1ed888cf601053c46ae6 (diff)
downloaddotty-e7b045a2fa9b1196465b388393ab23ce5979616e.tar.gz
dotty-e7b045a2fa9b1196465b388393ab23ce5979616e.tar.bz2
dotty-e7b045a2fa9b1196465b388393ab23ce5979616e.zip
Fix #1795: Avoid infinite recursion between member and asSeenFrom
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/Types.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala
index 069b4f60d..dcc1019e4 100644
--- a/compiler/src/dotty/tools/dotc/core/Types.scala
+++ b/compiler/src/dotty/tools/dotc/core/Types.scala
@@ -573,8 +573,13 @@ object Types {
{ val recCount = ctx.findMemberCount + 1
ctx.findMemberCount = recCount
- if (recCount >= Config.LogPendingFindMemberThreshold)
+ if (recCount >= Config.LogPendingFindMemberThreshold) {
ctx.pendingMemberSearches = name :: ctx.pendingMemberSearches
+ ctx.property(TypeOps.findMemberLimit) match {
+ case Some(limit) if ctx.findMemberCount > limit => return NoDenotation
+ case _ =>
+ }
+ }
}
//assert(ctx.findMemberCount < 20)