-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
protected-access
for attributes and methods of nested classes (…
…#5232) * Fix access to private function in inner class on protected-access bug * Add functional test for protected-access from inner class * Add Ikraduya to CONTRIBUTORS file * Add if statement to avoid potential bug * Fix ``protected-access`` for attributes and methods of nested classes This closes #3066 Co-authored-by: ikraduya <ikraduya@gmail.com> Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
- Loading branch information
1 parent
1d3a7ff
commit db5d77c
Showing
7 changed files
with
123 additions
and
16 deletions.
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
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
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
42 changes: 27 additions & 15 deletions
42
tests/functional/a/access/access_to_protected_members.txt
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 |
---|---|---|
@@ -1,16 +1,28 @@ | ||
protected-access:19:14:MyClass.test:Access to a protected member _haha of a client class | ||
protected-access:41:0::Access to a protected member _protected of a client class | ||
protected-access:42:6::Access to a protected member _protected of a client class | ||
protected-access:43:0::Access to a protected member _cls_protected of a client class | ||
protected-access:44:6::Access to a protected member _cls_protected of a client class | ||
protected-access:58:19:Issue1031.incorrect_access:Access to a protected member _protected of a client class | ||
protected-access:72:48:Issue1802.__eq__:Access to a protected member __private of a client class | ||
protected-access:80:32:Issue1802.not_in_special:Access to a protected member _foo of a client class | ||
protected-access:100:32:Issue1802.__fake_special__:Access to a protected member _foo of a client class | ||
protected-access:162:8:Issue1159.access_other_attr:Access to a protected member _bar of a client class | ||
protected-access:163:12:Issue1159.access_other_attr:Access to a protected member _foo of a client class | ||
protected-access:19:14:MyClass.test:Access to a protected member _haha of a client class:HIGH | ||
protected-access:41:0::Access to a protected member _protected of a client class:HIGH | ||
protected-access:42:6::Access to a protected member _protected of a client class:HIGH | ||
protected-access:43:0::Access to a protected member _cls_protected of a client class:HIGH | ||
protected-access:44:6::Access to a protected member _cls_protected of a client class:HIGH | ||
protected-access:58:19:Issue1031.incorrect_access:Access to a protected member _protected of a client class:HIGH | ||
protected-access:72:48:Issue1802.__eq__:Access to a protected member __private of a client class:HIGH | ||
protected-access:80:32:Issue1802.not_in_special:Access to a protected member _foo of a client class:HIGH | ||
protected-access:100:32:Issue1802.__fake_special__:Access to a protected member _foo of a client class:HIGH | ||
protected-access:162:8:Issue1159.access_other_attr:Access to a protected member _bar of a client class:HIGH | ||
protected-access:163:12:Issue1159.access_other_attr:Access to a protected member _foo of a client class:HIGH | ||
no-member:194:12:Issue1159Subclass.access_missing_member:Instance of 'Issue1159Subclass' has no '_baz' member; maybe '_bar'?:INFERENCE | ||
protected-access:194:12:Issue1159Subclass.access_missing_member:Access to a protected member _baz of a client class | ||
attribute-defined-outside-init:203:8:Issue1159Subclass.assign_missing_member:Attribute '_qux' defined outside __init__ | ||
protected-access:212:8:Issue1159Subclass.access_other_attr:Access to a protected member _bar of a client class | ||
protected-access:213:12:Issue1159Subclass.access_other_attr:Access to a protected member _foo of a client class | ||
protected-access:194:12:Issue1159Subclass.access_missing_member:Access to a protected member _baz of a client class:HIGH | ||
attribute-defined-outside-init:203:8:Issue1159Subclass.assign_missing_member:Attribute '_qux' defined outside __init__:HIGH | ||
protected-access:212:8:Issue1159Subclass.access_other_attr:Access to a protected member _bar of a client class:HIGH | ||
protected-access:213:12:Issue1159Subclass.access_other_attr:Access to a protected member _foo of a client class:HIGH | ||
protected-access:232:8:Issue3066.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:233:8:Issue3066.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:236:8:Issue3066.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:237:8:Issue3066.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:247:12:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:249:12:Issue3066.Aclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:251:12:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:253:12:Issue3066.Aclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:267:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:268:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _attr of a client class:HIGH | ||
protected-access:271:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:HIGH | ||
protected-access:272:16:Issue3066.Aclass.Bclass.foobar:Access to a protected member _bar of a client class:HIGH |