forked from zephir-lang/zephir
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a separate way to init object properties to initial values
We used the same function to change properties of an object: 1. let object->property = expression 2. class A { private object = []; } And to be able to change object's property we had to use object's scope. Thus, we have NEVER checked the scope in which we are actually located: // Global Scope class Bar { // Bar's Scope private prop; } class Foo { // Foo's Scope public function test (Bar bar) { // Here we replaced the scope by Bar's one let bar->prop = 42; } } Fixes zephir-lang#2057 /cc @niden @Jurigag
- Loading branch information
1 parent
2c9c549
commit aa126bc
Showing
3 changed files
with
118 additions
and
24 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