|
1 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15116.scala:5:13 ---------------------------------------- |
| 1 | +-- Error: tests/neg-custom-args/captures/i15116.scala:5:13 ------------------------------------------------------------- |
2 | 2 | 5 | val x = Foo(m) // error |
3 | 3 | | ^^^^^^ |
4 | | - | Found: test.Foo{val m: (Bar.this.m² : test.STR^)}^{Bar.this.m²} |
5 | | - | Required: test.Foo |
| 4 | + | value x needs an explicit type because the inferred type does not conform to |
| 5 | + | the type that is externally visible in other compilation units. |
| 6 | + | |
| 7 | + | Inferred type : test.Foo{val m: (Bar.this.m² : test.STR^)}^{Bar.this.m²} |
| 8 | + | Externally visible type: test.Foo |
6 | 9 | | |
7 | 10 | | where: ^ refers to a fresh root capability in the type of value m² |
8 | 11 | | m is a value in class Foo |
9 | 12 | | m² is a value in class Bar |
10 | | - | |
11 | | - | |
12 | | - | Note that the expected type test.Foo |
13 | | - | is the previously inferred type of value x |
14 | | - | which is also the type seen in separately compiled sources. |
15 | | - | The new inferred type test.Foo{val m: (Bar.this.m : test.STR^)}^{Bar.this.m} |
16 | | - | must conform to this type. |
17 | | - | |
18 | | - | longer explanation available when compiling with `-explain` |
19 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15116.scala:7:13 ---------------------------------------- |
| 13 | +-- Error: tests/neg-custom-args/captures/i15116.scala:7:13 ------------------------------------------------------------- |
20 | 14 | 7 | val x = Foo(m) // error |
21 | 15 | | ^^^^^^ |
22 | | - | Found: test.Foo{val m: (Baz.this.m² : test.STR^)}^{Baz.this.m²} |
23 | | - | Required: test.Foo |
| 16 | + | value x needs an explicit type because the inferred type does not conform to |
| 17 | + | the type that is externally visible in other compilation units. |
| 18 | + | |
| 19 | + | Inferred type : test.Foo{val m: (Baz.this.m² : test.STR^)}^{Baz.this.m²} |
| 20 | + | Externally visible type: test.Foo |
24 | 21 | | |
25 | 22 | | where: ^ refers to a fresh root capability in the type of value m² |
26 | 23 | | m is a value in class Foo |
27 | 24 | | m² is a value in trait Baz |
28 | | - | |
29 | | - | |
30 | | - | Note that the expected type test.Foo |
31 | | - | is the previously inferred type of value x |
32 | | - | which is also the type seen in separately compiled sources. |
33 | | - | The new inferred type test.Foo{val m: (Baz.this.m : test.STR^)}^{Baz.this.m} |
34 | | - | must conform to this type. |
35 | | - | |
36 | | - | longer explanation available when compiling with `-explain` |
37 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15116.scala:9:13 ---------------------------------------- |
| 25 | +-- Error: tests/neg-custom-args/captures/i15116.scala:9:13 ------------------------------------------------------------- |
38 | 26 | 9 | val x = Foo(m) // error |
39 | 27 | | ^^^^^^ |
40 | | - | Found: test.Foo{val m: (Bar1.this.m² : test.STR^)}^{Bar1.this.m²} |
41 | | - | Required: test.Foo |
| 28 | + | value x needs an explicit type because the inferred type does not conform to |
| 29 | + | the type that is externally visible in other compilation units. |
| 30 | + | |
| 31 | + | Inferred type : test.Foo{val m: (Bar1.this.m² : test.STR^)}^{Bar1.this.m²} |
| 32 | + | Externally visible type: test.Foo |
42 | 33 | | |
43 | 34 | | where: ^ refers to a fresh root capability in the type of value m² |
44 | 35 | | m is a value in class Foo |
45 | 36 | | m² is a value in class Bar1 |
46 | | - | |
47 | | - | |
48 | | - | Note that the expected type test.Foo |
49 | | - | is the previously inferred type of value x |
50 | | - | which is also the type seen in separately compiled sources. |
51 | | - | The new inferred type test.Foo{val m: (Bar1.this.m : test.STR^)}^{Bar1.this.m} |
52 | | - | must conform to this type. |
53 | | - | |
54 | | - | longer explanation available when compiling with `-explain` |
55 | | --- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i15116.scala:11:13 --------------------------------------- |
| 37 | +-- Error: tests/neg-custom-args/captures/i15116.scala:11:13 ------------------------------------------------------------ |
56 | 38 | 11 | val x = Foo(m) // error |
57 | 39 | | ^^^^^^ |
58 | | - | Found: test.Foo{val m: (Baz2.this.m² : test.STR^)}^{Baz2.this.m²} |
59 | | - | Required: test.Foo |
| 40 | + | value x needs an explicit type because the inferred type does not conform to |
| 41 | + | the type that is externally visible in other compilation units. |
| 42 | + | |
| 43 | + | Inferred type : test.Foo{val m: (Baz2.this.m² : test.STR^)}^{Baz2.this.m²} |
| 44 | + | Externally visible type: test.Foo |
60 | 45 | | |
61 | 46 | | where: ^ refers to a fresh root capability in the type of value m² |
62 | 47 | | m is a value in class Foo |
63 | 48 | | m² is a value in trait Baz2 |
64 | | - | |
65 | | - | |
66 | | - | Note that the expected type test.Foo |
67 | | - | is the previously inferred type of value x |
68 | | - | which is also the type seen in separately compiled sources. |
69 | | - | The new inferred type test.Foo{val m: (Baz2.this.m : test.STR^)}^{Baz2.this.m} |
70 | | - | must conform to this type. |
71 | | - | |
72 | | - | longer explanation available when compiling with `-explain` |
0 commit comments