Skip to content

Commit 0c974fd

Browse files
committed
Make disambiguate an inline function
Avoids creation of a closure in a hotspot (staticRef)
1 parent af7112f commit 0c974fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ object Denotations {
277277
* single-denotations that do not satisfy the predicate are left alone
278278
* (whereas suchThat would map them to NoDenotation).
279279
*/
280-
def disambiguate(p: Symbol => Boolean)(using Context): SingleDenotation = this match {
280+
inline def disambiguate(inline p: Symbol => Boolean)(using Context): SingleDenotation = this match {
281281
case sdenot: SingleDenotation => sdenot
282282
case mdenot => suchThat(p) orElse NoQualifyingRef(alternatives)
283283
}

0 commit comments

Comments
 (0)