Commit 0b92c3c
committed
Fix accessibility case for static java members
Given
```
public class A {
protected static class AI { }
}
public class B extends A {
public static class BI extends AI { }
}
```
The owner of `AI` is the module class `A$`, the owner of `BI` is the
module class `B$`. When checking if the protected `AI` can be accessed
in `B$`, we need to navigate from `B$` to `B`. The inheritance chain
is not reflected in the module classes.1 parent e86724e commit 0b92c3c
File tree
4 files changed
+18
-1
lines changed- src/compiler/scala/tools/nsc/typechecker
- test/files/pos/t12673
4 files changed
+18
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
899 | | - | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
900 | 902 | | |
901 | 903 | | |
902 | 904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments