Description
The rule private-access is triggered when accessing a private instance member from a static context within the same class. See the example below.
The rule message is "... should not be accessed from outside its class" which let me think this is not intentional and is a bug.
Reproduce
class_name Foo
var _data: int
func _method() -> void:
pass
static func do(foo: Foo) -> void:
foo._data = 0
foo._method()
Expected behaviour
No linter rule triggered.
Observed behaviour
The above example triggers :
[private-access] Private variable '_data' should not be accessed from outside its class
[private-access] Private method '_method' should not be accessed from outside its class
But this is not an access from outside the class...
Description
The rule
private-accessis triggered when accessing a private instance member from a static context within the same class. See the example below.The rule message is "... should not be accessed from outside its class" which let me think this is not intentional and is a bug.
Reproduce
Expected behaviour
No linter rule triggered.
Observed behaviour
The above example triggers :
[private-access] Private variable '_data' should not be accessed from outside its class[private-access] Private method '_method' should not be accessed from outside its classBut this is not an access from outside the class...