Skip to content

Commit

Permalink
Allow private members when computing the denotation of a NamedType (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal authored Feb 7, 2025
2 parents 47881da + 6d00305 commit 8d8b5b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ object Types extends TypeUtils {
else lastd match {
case lastd: SymDenotation =>
if stillValid(lastd) && checkedPeriod.code != NowhereCode then finish(lastd.current)
else finish(memberDenot(lastd.initial.name, allowPrivate = false))
else finish(memberDenot(lastd.initial.name, allowPrivate = lastd.is(Private)))
case _ =>
fromDesignator
}
Expand Down
2 changes: 2 additions & 0 deletions tests/pos/i22548.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
trait Bar[T]
class Foo[T <: Bar[T]] (private val buffer: Any) extends AnyVal

0 comments on commit 8d8b5b9

Please sign in to comment.