File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -3862,7 +3862,7 @@ object Types extends TypeUtils {
38623862 if tp.prefix eq pre then tp
38633863 else
38643864 pre match
3865- case ref : ParamRef if (ref.binder eq self) && tp.symbol.exists =>
3865+ case ref : ParamRef if (ref.binder eq self) && tp.symbol.exists && tp.symbol.is( Method ) =>
38663866 NamedType (pre, tp.name, tp.denot.asSeenFrom(pre))
38673867 case _ =>
38683868 tp.derivedSelect(pre)
Original file line number Diff line number Diff line change 1+ trait HasA [T ]:
2+ type A = T
3+
4+ object Test1 :
5+ def foo1 (h : HasA [? ])(a : h.A ): Unit = {}
6+
7+ def foo2 (h1 : HasA [? ])(a1 : h1.A ): Unit =
8+ foo1(h1)(a1)
9+
10+ def foo3 (h1 : HasA [? ], a1 : h1.A ): Unit =
11+ foo1(h1)(a1)
12+
13+ object Test2 :
14+ def bar1 (h : HasA [? ], a : h.A ): Unit = {}
15+
16+ def bar2 (h1 : HasA [? ], a1 : h1.A ): Unit =
17+ bar1(h1, a1)
18+
19+ def foo3 (h1 : HasA [? ])(a1 : h1.A ): Unit =
20+ bar2(h1, a1)
You can’t perform that action at this time.
0 commit comments