|
2 | 2 | 5 | class B extends X.Y // error
|
3 | 3 | | ^^^
|
4 | 4 | | class Y cannot be accessed as a member of X.type from class B.
|
5 |
| - | Access to protected class Y not permitted because enclosing object A |
6 |
| - | is not a subclass of object X where target is defined |
| 5 | + | Protected class Y can only be accessed from object X. |
7 | 6 | -- [E173] Reference Error: tests/neg/i7709.scala:6:21 ------------------------------------------------------------------
|
8 | 7 | 6 | class B2 extends X.Y: // error
|
9 | 8 | | ^^^
|
10 | 9 | | class Y cannot be accessed as a member of X.type from class B2.
|
11 |
| - | Access to protected class Y not permitted because enclosing object A |
12 |
| - | is not a subclass of object X where target is defined |
| 10 | + | Protected class Y can only be accessed from object X. |
13 | 11 | -- [E173] Reference Error: tests/neg/i7709.scala:9:28 ------------------------------------------------------------------
|
14 | 12 | 9 | class B4 extends B3(new X.Y) // error
|
15 | 13 | | ^^^
|
16 | 14 | | class Y cannot be accessed as a member of X.type from class B4.
|
17 |
| - | Access to protected class Y not permitted because enclosing object A |
18 |
| - | is not a subclass of object X where target is defined |
| 15 | + | Protected class Y can only be accessed from object X. |
19 | 16 | -- [E173] Reference Error: tests/neg/i7709.scala:11:34 -----------------------------------------------------------------
|
20 | 17 | 11 | def this(n: Int) = this(new X.Y().toString) // error
|
21 | 18 | | ^^^
|
22 | 19 | | class Y cannot be accessed as a member of X.type from class B5.
|
23 |
| - | Access to protected class Y not permitted because enclosing object A |
24 |
| - | is not a subclass of object X where target is defined |
| 20 | + | Protected class Y can only be accessed from object X. |
25 | 21 | -- [E173] Reference Error: tests/neg/i7709.scala:13:20 -----------------------------------------------------------------
|
26 | 22 | 13 | class B extends X.Y // error
|
27 | 23 | | ^^^
|
28 | 24 | | class Y cannot be accessed as a member of X.type from class B.
|
29 |
| - | Access to protected class Y not permitted because enclosing trait T |
30 |
| - | is not a subclass of object X where target is defined |
| 25 | + | Protected class Y can only be accessed from object X. |
31 | 26 | -- [E173] Reference Error: tests/neg/i7709.scala:18:18 -----------------------------------------------------------------
|
32 | 27 | 18 | def y = new xx.Y // error
|
33 | 28 | | ^^^^
|
34 | 29 | | class Y cannot be accessed as a member of XX from class C.
|
35 |
| - | Access to protected class Y not permitted because enclosing class C |
36 |
| - | is not a subclass of class XX where target is defined |
| 30 | + | Protected class Y can only be accessed from class XX or one of its subclasses. |
37 | 31 | -- [E173] Reference Error: tests/neg/i7709.scala:23:20 -----------------------------------------------------------------
|
38 | 32 | 23 | def y = new xx.Y // error
|
39 | 33 | | ^^^^
|
40 | 34 | | class Y cannot be accessed as a member of XX from class D.
|
41 |
| - | Access to protected class Y not permitted because enclosing class D |
42 |
| - | is not a subclass of class XX where target is defined |
| 35 | + | Protected class Y can only be accessed from class XX or one of its subclasses. |
43 | 36 | -- [E173] Reference Error: tests/neg/i7709.scala:31:20 -----------------------------------------------------------------
|
44 | 37 | 31 | class Q extends X.Y // error
|
45 | 38 | | ^^^
|
46 | 39 | | class Y cannot be accessed as a member of p.X.type from class Q.
|
47 |
| - | Access to protected class Y not permitted because enclosing package p |
48 |
| - | is not a subclass of object X in package p where target is defined |
| 40 | + | Protected class Y can only be accessed from object X in package p. |
0 commit comments