File tree 2 files changed +22
-1
lines changed
compiler/src/dotty/tools/dotc/core
tests/pos-custom-args/captures
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -4054,7 +4054,7 @@ object Types extends TypeUtils {
4054
4054
tp match
4055
4055
case CapturingType (parent, refs) =>
4056
4056
(compute(status, parent, theAcc) /: refs.elems) {
4057
- (s, ref) => ref match
4057
+ (s, ref) => ref.stripReach match
4058
4058
case tp : TermParamRef if tp.binder eq thisLambdaType => combine(s, CaptureDeps )
4059
4059
case _ => s
4060
4060
}
Original file line number Diff line number Diff line change
1
+ object Test :
2
+ class C
3
+ type Proc = () => Unit
4
+
5
+ def f (c : C ^ , d : C ^ ): () -> {c, d} Unit =
6
+ def foo (xs : Proc * ): () -> {xs* } Unit =
7
+ xs.head
8
+ val a : () -> {c} Unit = () => ()
9
+ val b : () -> {d} Unit = () => ()
10
+ val xx = foo(a, b)
11
+ xx
12
+
13
+ def g (c : C ^ , d : C ^ ): () -> {c, d} Unit =
14
+
15
+ def foo (xs : Seq [() => Unit ]): () -> {xs* } Unit =
16
+ xs.head
17
+
18
+ val a : () -> {c} Unit = () => ()
19
+ val b : () -> {d} Unit = () => ()
20
+ val xx = foo(Seq (a, b))
21
+ xx
You can’t perform that action at this time.
0 commit comments