OOP: Constructors and destructors does not obey to access modifiers #4
Метки
Нет меток
aerscript
bug
duplicate
enhancement
help wanted
idea
question
won't fix
Нет этапа
Нет назначенных лиц
1 участников
Уведомления
Срок выполнения
Срок выполнения не установлен.
Зависимости
Зависимостей нет.
Ссылка: aerscript/Aer#4
Загрузка…
Ссылка в новой задаче
Block a user
Описание отсутствует.
Удалить ветку «%!s()»
Удаление ветки необратимо. Несмотря на то, что удаленная ветка может просуществовать некоторое время перед тем, как она будет окончательно удалена, это действие НЕВОЗМОЖНО отменить в большинстве случаев. Продолжить?
Aer Information
e53cfb8ba0
Your problem description
__construct() and __destruct() are always considered to be public by PH7 Engine and this is wrong behaviour. There should be no exception in the matter of how access modifiers are working.
Above example shows that when calling private __toString method from constructor it is working, but call from outside class is omitted, as expected. Anyway constructor is still called, despite it is private.
Expected results
// No output at all
Current results
I live, again!
STRING
This is fixed by
408ccc73c2
.