File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -1918,13 +1918,19 @@ object Types {
1918
1918
finish(symd.current)
1919
1919
}
1920
1920
1921
+ def current (sd : SingleDenotation ) = finish {
1922
+ sd.current match
1923
+ case sdc : SymDenotation if prefix ne sdc.owner.thisType => sdc.asSeenFrom(prefix)
1924
+ case sdc => sdc
1925
+ }
1926
+
1921
1927
lastDenotation match {
1922
1928
case lastd0 : SingleDenotation =>
1923
1929
val lastd = lastd0.skipRemoved
1924
- if (lastd.validFor.runId == ctx.runId && (checkedPeriod != Nowhere )) finish (lastd.current )
1930
+ if (lastd.validFor.runId == ctx.runId && (checkedPeriod != Nowhere )) current (lastd)
1925
1931
else lastd match {
1926
1932
case lastd : SymDenotation =>
1927
- if (ctx.stillValid(lastd) && (checkedPeriod != Nowhere )) finish (lastd.current )
1933
+ if (ctx.stillValid(lastd) && (checkedPeriod != Nowhere )) current (lastd)
1928
1934
else finish(memberDenot(lastd.initial.name, allowPrivate = false ))
1929
1935
case _ =>
1930
1936
fromDesignator
Original file line number Diff line number Diff line change
1
+ trait CompilerInterface {
2
+ type Tree22
3
+ }
4
+
5
+ class Reflect (val internal : CompilerInterface ) {
6
+ opaque type Tree22 = internal.Tree22
7
+ def show (t : Tree22 ): String = ???
8
+ }
9
+
10
+ object App {
11
+ val refl : Reflect = ???
12
+ import refl ._
13
+
14
+ show(??? : Tree22 )
15
+ }
You can’t perform that action at this time.
0 commit comments