-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 15897 - private base class method not seen through derived …
…class - properly deprecate private symbol visibility through derived classes
- Loading branch information
1 parent
c5a5758
commit b6dba31
Showing
3 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module imports.test15897; | ||
import test15897; | ||
|
||
class Cat : Animal | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// REQUIRED_ARGS: -de | ||
/* | ||
TEST_OUTPUT: | ||
--- | ||
fail_compilation/test15897.d(18): Deprecation: test15897.Animal.create is not visible from class Cat | ||
--- | ||
*/ | ||
module test15897; | ||
import imports.test15897; | ||
|
||
class Animal | ||
{ | ||
private void create() {} | ||
} | ||
|
||
void foo(Cat cat) | ||
{ | ||
cat.create(); | ||
} |