|
| 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:9:8 ------------------------------- |
| 2 | +9 | v = x // error |
| 3 | + | ^ |
| 4 | + | Found: (x : IO) |
| 5 | + | Required: IO^ |
| 6 | + | |
| 7 | + | Note that capability x is not included in capture set {cap} |
| 8 | + | because (x : IO) in method f1 is not visible from cap in variable v. |
| 9 | + | |
| 10 | + | where: ^ and cap refer to a fresh root capability classified as SharedCapability in the type of variable v |
| 11 | + | |
| 12 | + | longer explanation available when compiling with `-explain` |
| 13 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:10:8 ------------------------------ |
| 14 | +10 | w = g // error |
| 15 | + | ^ |
| 16 | + | Found: () ->{x} Unit |
| 17 | + | Required: () => Unit |
| 18 | + | |
| 19 | + | Note that capability x is not included in capture set {cap} |
| 20 | + | because (x : IO) in method f1 is not visible from cap in variable w. |
| 21 | + | |
| 22 | + | where: => and cap refer to a fresh root capability in the type of variable w |
| 23 | + | |
| 24 | + | longer explanation available when compiling with `-explain` |
| 25 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:19:11 ----------------------------- |
| 26 | +19 | withFile(io => io) // error |
| 27 | + | ^^^^^^^^ |
| 28 | + |Capability io outlives its scope: it leaks into outer capture set 's1 which is owned by method test. |
| 29 | + |The leakage occurred when trying to match the following types: |
| 30 | + | |
| 31 | + |Found: (io: IO^'s2) ->'s3 IO^{io} |
| 32 | + |Required: IO^ => IO^'s1 |
| 33 | + | |
| 34 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 35 | + | ^ refers to the universal root capability |
| 36 | + | |
| 37 | + | longer explanation available when compiling with `-explain` |
| 38 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:20:11 ----------------------------- |
| 39 | +20 | withFile(id) // error |
| 40 | + | ^^ |
| 41 | + |Capability x outlives its scope: it leaks into outer capture set 's4 which is owned by method test. |
| 42 | + |The leakage occurred when trying to match the following types: |
| 43 | + | |
| 44 | + |Found: (x: IO^) ->'s5 IO^{x} |
| 45 | + |Required: IO^ => IO^'s4 |
| 46 | + | |
| 47 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 48 | + | ^ refers to the universal root capability |
| 49 | + | |
| 50 | + | longer explanation available when compiling with `-explain` |
| 51 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:21:11 ----------------------------- |
| 52 | +21 | withFile(x => id(x)) // error |
| 53 | + | ^^^^^^^^^^ |
| 54 | + |Capability x outlives its scope: it leaks into outer capture set 's6 which is owned by method test. |
| 55 | + |The leakage occurred when trying to match the following types: |
| 56 | + | |
| 57 | + |Found: (x: IO^'s7) ->'s8 IO^{x} |
| 58 | + |Required: IO^ => IO^'s6 |
| 59 | + | |
| 60 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 61 | + | ^ refers to the universal root capability |
| 62 | + | |
| 63 | + | longer explanation available when compiling with `-explain` |
| 64 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:22:11 ----------------------------- |
| 65 | +22 | withFile(id2) // error, note mentions cap since we never have a more specific include failure |
| 66 | + | ^^^ |
| 67 | + |Capability cap outlives its scope: it leaks into outer capture set 's9 which is owned by method test. |
| 68 | + |The leakage occurred when trying to match the following types: |
| 69 | + | |
| 70 | + |Found: (x: IO^) ->'s10 IO^² |
| 71 | + |Required: IO^ => IO^'s9 |
| 72 | + | |
| 73 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 74 | + | ^ refers to the universal root capability |
| 75 | + | ^² refers to a root capability associated with the result type of (x: IO^): IO^² |
| 76 | + | cap is a root capability associated with the result type of (x: IO^): IO^'s9 |
| 77 | + | |
| 78 | + | longer explanation available when compiling with `-explain` |
| 79 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:23:11 ----------------------------- |
| 80 | +23 | withFile(x => id2(x)) // error, note mentions cap since we never have a more specific include failure |
| 81 | + | ^^^^^^^^^^^ |
| 82 | + |Capability cap outlives its scope: it leaks into outer capture set 's11 which is owned by method test. |
| 83 | + |The leakage occurred when trying to match the following types: |
| 84 | + | |
| 85 | + |Found: (x: IO^'s12) ->'s13 IO^ |
| 86 | + |Required: IO^² => IO^'s11 |
| 87 | + | |
| 88 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 89 | + | ^ refers to a root capability associated with the result type of (x: IO^'s12): IO^ |
| 90 | + | ^² refers to the universal root capability |
| 91 | + | cap is a root capability associated with the result type of (x: IO^²): IO^'s11 |
| 92 | + | |
| 93 | + | longer explanation available when compiling with `-explain` |
| 94 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:24:11 ----------------------------- |
| 95 | +24 | withFile(identity) // error, note mentions cap since we never have a more specific include failure |
| 96 | + | ^^^^^^^^ |
| 97 | + |Capability cap outlives its scope: it leaks into outer capture set 's14 which is owned by method test. |
| 98 | + |The leakage occurred when trying to match the following types: |
| 99 | + | |
| 100 | + |Found: (x: IO^'s15) ->'s16 IO^'s17 |
| 101 | + |Required: IO^ => IO^'s14 |
| 102 | + | |
| 103 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 104 | + | ^ refers to the universal root capability |
| 105 | + | cap is a root capability associated with the result type of (x: IO^): IO^'s14 |
| 106 | + | |
| 107 | + | longer explanation available when compiling with `-explain` |
| 108 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:25:11 ----------------------------- |
| 109 | +25 | withFile(x => identity(x)) // error, note mentions cap since we never have a more specific include failure |
| 110 | + | ^^^^^^^^^^^^^^^^ |
| 111 | + |Capability cap outlives its scope: it leaks into outer capture set 's18 which is owned by method test. |
| 112 | + |The leakage occurred when trying to match the following types: |
| 113 | + | |
| 114 | + |Found: (x: IO^'s19) ->'s20 IO^'s21 |
| 115 | + |Required: IO^ => IO^'s18 |
| 116 | + | |
| 117 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 118 | + | ^ refers to the universal root capability |
| 119 | + | cap is a root capability associated with the result type of (x: IO^): IO^'s18 |
| 120 | + | |
| 121 | + | longer explanation available when compiling with `-explain` |
| 122 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:27:12 ----------------------------- |
| 123 | +27 | withFile: io => // error |
| 124 | + | ^ |
| 125 | + |Capability io outlives its scope: it leaks into outer capture set 's22 which is owned by method test. |
| 126 | + |The leakage occurred when trying to match the following types: |
| 127 | + | |
| 128 | + |Found: (io: IO^'s23) ->'s24 () ->{io} Unit |
| 129 | + |Required: IO^ => () ->'s22 Unit |
| 130 | + | |
| 131 | + |where: => refers to a fresh root capability created in method test when checking argument to parameter op of method withFile |
| 132 | + | ^ refers to the universal root capability |
| 133 | +28 | () => println(io) |
| 134 | + | |
| 135 | + | longer explanation available when compiling with `-explain` |
| 136 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:30:21 ----------------------------- |
| 137 | +30 | val f2: IO => IO = (x: IO) => x // error |
| 138 | + | ^^^^^^^^^^^^ |
| 139 | + | Found: (x: IO^) ->'s25 IO^{x} |
| 140 | + | Required: IO^ => IO^² |
| 141 | + | |
| 142 | + | Note that capability x is not included in capture set {cap} |
| 143 | + | because (x : IO) is not visible from cap in value f2. |
| 144 | + | |
| 145 | + | where: => refers to a fresh root capability in the type of value f2 |
| 146 | + | ^ refers to the universal root capability |
| 147 | + | ^² and cap refer to a fresh root capability classified as SharedCapability in the type of value f2 |
| 148 | + | |
| 149 | + | longer explanation available when compiling with `-explain` |
| 150 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scope-extrusions.scala:32:21 ----------------------------- |
| 151 | +32 | val f4: IO => IO = f3 // error |
| 152 | + | ^^ |
| 153 | + | Found: (f3 : (x$0: IO) ->{} IO^{x$0}) |
| 154 | + | Required: IO^ => IO^² |
| 155 | + | |
| 156 | + | Note that capability x$0 is not included in capture set {cap} |
| 157 | + | because (x$0 : IO) is not visible from cap in value f4. |
| 158 | + | |
| 159 | + | where: => refers to a fresh root capability in the type of value f4 |
| 160 | + | ^ refers to the universal root capability |
| 161 | + | ^² and cap refer to a fresh root capability classified as SharedCapability in the type of value f4 |
| 162 | + | |
| 163 | + | longer explanation available when compiling with `-explain` |
0 commit comments