Skip to content

Commit 5943ed6

Browse files
authored
Merge pull request #238 from scala/backport-lts-3.3-22549
Backport "Allow private members when computing the denotation of a NamedType" to 3.3 LTS
2 parents 08efb4f + 2372eda commit 5943ed6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ object Types extends TypeUtils {
24122412
else lastd match {
24132413
case lastd: SymDenotation =>
24142414
if stillValid(lastd) && checkedPeriod.code != NowhereCode then finish(lastd.current)
2415-
else finish(memberDenot(lastd.initial.name, allowPrivate = false))
2415+
else finish(memberDenot(lastd.initial.name, allowPrivate = lastd.is(Private)))
24162416
case _ =>
24172417
fromDesignator
24182418
}

tests/pos/i22548.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trait Bar[T]
2+
class Foo[T <: Bar[T]] (private val buffer: Any) extends AnyVal

0 commit comments

Comments
 (0)