Commit 35c2ef3
authored
Add accessible check for import usage (#23348)
Fixes #23347
The code for deciding whether a selector is used to import a symbol was
missing a check for accessibility (importability).
3.6.4 doesn't warn, so it would be nice to know why it excludes the
member. The algorithm is different but the code for choosing import
selectors is similar. 3.7.0 also doesn't warn, but no change stands out
as a culprit. Possibly the selector was spuriously excluded (by result
caching in 3.7.0).File tree
2 files changed
+26
-2
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/warn
2 files changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
309 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
310 | 312 | | |
311 | 313 | | |
312 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments