File tree 2 files changed +21
-1
lines changed
compiler/src/dotty/tools/dotc/core 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 {
3862
3862
if tp.prefix eq pre then tp
3863
3863
else
3864
3864
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 ) =>
3866
3866
NamedType (pre, tp.name, tp.denot.asSeenFrom(pre))
3867
3867
case _ =>
3868
3868
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