summaryrefslogtreecommitdiff
path: root/test/files/pos/t9157.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-9157 Avoid exponential blowup with chained type projectionsJason Zaugg2015-02-181-0/+13
Calling `findMember` in the enclosed test was calling into `NonClassTypeRef#relativeInfo` an exponentially-increasing number of times, with respect to the length of the chained type projections. The numbers of calls increased as: 26, 326, 3336, 33446, 334556. Can any pattern spotters in the crowd that can identify the sequence? (I can't.) Tracing the calls saw we were computing the same `memberType` repeatedly. This part of the method was not guarded by the cache. I have changed the method to use the standard idiom of using the current period for cache invalidation. The enclosed test now compiles promptly, rather than in geological time.