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 @@ -3863,7 +3863,7 @@ object Types extends TypeUtils {
3863
3863
if tp.prefix eq pre then tp
3864
3864
else
3865
3865
pre match
3866
- case ref : ParamRef if (ref.binder eq self) && tp.symbol.exists =>
3866
+ case ref : ParamRef if (ref.binder eq self) && tp.symbol.exists && tp.symbol.is( Method ) =>
3867
3867
NamedType (pre, tp.name, tp.denot.asSeenFrom(pre))
3868
3868
case _ =>
3869
3869
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