File tree 2 files changed +10
-1
lines changed
compiler/src/dotty/tools/dotc/core
tests/pos-custom-args/captures
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -3880,7 +3880,8 @@ object Types {
3880
3880
/** Does one of the parameter types contain references to earlier parameters
3881
3881
* of this method type which cannot be eliminated by de-aliasing?
3882
3882
*/
3883
- def isParamDependent (using Context ): Boolean = paramDependencyStatus == TrueDeps
3883
+ def isParamDependent (using Context ): Boolean =
3884
+ paramDependencyStatus == TrueDeps || paramDependencyStatus == CaptureDeps
3884
3885
3885
3886
/** Is there a dependency involving a reference in a capture set, but
3886
3887
* otherwise no true result dependency?
Original file line number Diff line number Diff line change
1
+ import language .experimental .captureChecking
2
+
3
+ trait Foo [T ]
4
+ def test (): Unit =
5
+ val a : Foo [Int ]^ = ???
6
+ val useA : () -> {a} Unit = ???
7
+ def foo [X ](x : Foo [X ]^ , op : () -> {x} Unit ): Unit = ???
8
+ foo(a, useA)
You can’t perform that action at this time.
0 commit comments