|
| 1 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:7:20 ----------------------------------- |
| 2 | +7 | val g: A^ -> B^ = f // error |
| 3 | + | ^ |
| 4 | + | Found: (f : (x: A^) -> B^²) |
| 5 | + | Required: A^ -> B^³ |
| 6 | + | |
| 7 | + | where: ^ refers to the universal root capability |
| 8 | + | ^² refers to a root capability associated with the result type of (x: A^): B^² |
| 9 | + | ^³ refers to a fresh root capability in the type of value g |
| 10 | + | |
| 11 | + | longer explanation available when compiling with `-explain` |
| 12 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:9:25 ----------------------------------- |
| 13 | +9 | val _: (x: A^) -> B^ = g // error |
| 14 | + | ^ |
| 15 | + | Found: (g : A^ -> B^²) |
| 16 | + | Required: (x: A^) -> B^³ |
| 17 | + | |
| 18 | + | where: ^ refers to the universal root capability |
| 19 | + | ^² refers to a fresh root capability in the type of value g |
| 20 | + | ^³ refers to a root capability associated with the result type of (x: A^): B^³ |
| 21 | + | |
| 22 | + | |
| 23 | + | Note that the existential capture root in B^ |
| 24 | + | cannot subsume the capability cap |
| 25 | + | |
| 26 | + | longer explanation available when compiling with `-explain` |
| 27 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:10:20 ---------------------------------- |
| 28 | +10 | val _: A^ -> B^ = f // error |
| 29 | + | ^ |
| 30 | + | Found: (f : (x: A^) -> B^²) |
| 31 | + | Required: A^ -> B^³ |
| 32 | + | |
| 33 | + | where: ^ refers to the universal root capability |
| 34 | + | ^² refers to a root capability associated with the result type of (x: A^): B^² |
| 35 | + | ^³ refers to a fresh root capability in the type of value _$3 |
| 36 | + | |
| 37 | + | longer explanation available when compiling with `-explain` |
| 38 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:12:20 ---------------------------------- |
| 39 | +12 | val _: A^ -> B^ = x => g(x) // error, since g is pure, g(x): B^{x} , which does not match B^{fresh} |
| 40 | + | ^^^^^^^^^ |
| 41 | + | Found: (x: A^) ->? B^{x} |
| 42 | + | Required: (x: A^) -> B^² |
| 43 | + | |
| 44 | + | where: ^ refers to the universal root capability |
| 45 | + | ^² refers to a fresh root capability in the type of value _$5 |
| 46 | + | |
| 47 | + | longer explanation available when compiling with `-explain` |
| 48 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:13:25 ---------------------------------- |
| 49 | +13 | val _: (x: A^) -> B^ = x => f(x) // error: existential in B cannot subsume `x` since `x` is not shared |
| 50 | + | ^^^^^^^^^ |
| 51 | + | Found: (x: A^) ->? B^{x} |
| 52 | + | Required: (x: A^) -> B^² |
| 53 | + | |
| 54 | + | where: ^ refers to the universal root capability |
| 55 | + | ^² refers to a root capability associated with the result type of (x: A^): B^² |
| 56 | + | |
| 57 | + | |
| 58 | + | Note that the existential capture root in B^ |
| 59 | + | cannot subsume the capability x.type since that capability is not a SharedCapability |
| 60 | + | |
| 61 | + | longer explanation available when compiling with `-explain` |
| 62 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:16:24 ---------------------------------- |
| 63 | +16 | val _: (x: S) -> B^ = h // error: direct conversion fails |
| 64 | + | ^ |
| 65 | + | Found: (h : S -> B^) |
| 66 | + | Required: (x: S) -> B^² |
| 67 | + | |
| 68 | + | where: ^ refers to a fresh root capability in the type of value h |
| 69 | + | ^² refers to a root capability associated with the result type of (x: S): B^² |
| 70 | + | |
| 71 | + | |
| 72 | + | Note that the existential capture root in B^ |
| 73 | + | cannot subsume the capability cap |
| 74 | + | |
| 75 | + | longer explanation available when compiling with `-explain` |
| 76 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:22:19 ---------------------------------- |
| 77 | +22 | val _: S -> B^ = j // error |
| 78 | + | ^ |
| 79 | + | Found: (j : (x: S) -> B^) |
| 80 | + | Required: S -> B^² |
| 81 | + | |
| 82 | + | where: ^ refers to a root capability associated with the result type of (x: S): B^ |
| 83 | + | ^² refers to a fresh root capability in the type of value _$11 |
| 84 | + | |
| 85 | + | longer explanation available when compiling with `-explain` |
| 86 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:23:19 ---------------------------------- |
| 87 | +23 | val _: S -> B^ = x => j(x) // error |
| 88 | + | ^^^^^^^^^ |
| 89 | + | Found: (x: S) ->? B^{x} |
| 90 | + | Required: (x: S) -> B^ |
| 91 | + | |
| 92 | + | where: ^ refers to a fresh root capability in the type of value _$12 |
| 93 | + | |
| 94 | + | longer explanation available when compiling with `-explain` |
| 95 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:26:20 ---------------------------------- |
| 96 | +26 | val _: A^ => B^ = x => g2(x) // error: g2(x): B^{g2, x}, and the `x` cannot be subsumed by fresh |
| 97 | + | ^^^^^^^^^^ |
| 98 | + | Found: (x: A^) ->{g2} B^² |
| 99 | + | Required: (x: A^) => B^³ |
| 100 | + | |
| 101 | + | where: => refers to a fresh root capability in the type of value _$13 |
| 102 | + | ^ refers to the universal root capability |
| 103 | + | ^² refers to a root capability associated with the result type of (x: A^): B^² |
| 104 | + | ^³ refers to a fresh root capability in the type of value _$13 |
| 105 | + | |
| 106 | + | longer explanation available when compiling with `-explain` |
| 107 | +-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/scoped-caps.scala:28:24 ---------------------------------- |
| 108 | +28 | val _: A^{io} => B^ = x => g3(x) // error, fails level checking of fresh instances |
| 109 | + | ^^^^^^^^^^ |
| 110 | + | Found: (x: A^{io}) ->{g3} B^ |
| 111 | + | Required: (x: A^{io}) => B^² |
| 112 | + | |
| 113 | + | where: => refers to a fresh root capability in the type of value _$14 |
| 114 | + | ^ refers to a root capability associated with the result type of (x: A^{io}): B^ |
| 115 | + | ^² refers to a fresh root capability in the type of value _$14 |
| 116 | + | |
| 117 | + | longer explanation available when compiling with `-explain` |
0 commit comments