Skip to content

Commit

Permalink
Merge pull request #521 from ovr/520_issue
Browse files Browse the repository at this point in the history
Fix #520 Issue
  • Loading branch information
Phalcon committed Sep 14, 2014
2 parents f614412 + a4b4b05 commit b2a3062
Show file tree
Hide file tree
Showing 22 changed files with 170 additions and 434 deletions.
14 changes: 12 additions & 2 deletions Library/ClassProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,18 @@ public function compile(CompilationContext $compilationContext)
}

if ($needLetStatementAdded) {
$statements[] = $letStatement;
$statementsBlock->setStatements($statements);
$newStatements = array();

/**
* Start from let statement
*/
$newStatements[] = $letStatement;

foreach ($statements as $statement) {
$newStatements[] = $statement;
}

$statementsBlock->setStatements($newStatements);
$constructMethod->setStatementsBlock($statementsBlock);
$compilationContext->classDefinition->getEventsManager()->dispatch('setMethod', array($constructMethod));
}
Expand Down
1 change: 1 addition & 0 deletions ext/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ if test "$PHP_TEST" = "yes"; then
test/pregmatch.zep.c
test/properties/extendspublicproperties.zep.c
test/properties/privateproperties.zep.c
test/properties/propertyarray.zep.c
test/properties/protectedproperties.zep.c
test/properties/publicproperties.zep.c
test/properties/staticprotectedproperties.zep.c
Expand Down
2 changes: 2 additions & 0 deletions ext/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ zend_class_entry *test_pdostatement_ce;
zend_class_entry *test_pregmatch_ce;
zend_class_entry *test_properties_extendspublicproperties_ce;
zend_class_entry *test_properties_privateproperties_ce;
zend_class_entry *test_properties_propertyarray_ce;
zend_class_entry *test_properties_protectedproperties_ce;
zend_class_entry *test_properties_staticprotectedproperties_ce;
zend_class_entry *test_properties_staticpublicproperties_ce;
Expand Down Expand Up @@ -385,6 +386,7 @@ static PHP_MINIT_FUNCTION(test)
ZEPHIR_INIT(Test_Pregmatch);
ZEPHIR_INIT(Test_Properties_ExtendsPublicProperties);
ZEPHIR_INIT(Test_Properties_PrivateProperties);
ZEPHIR_INIT(Test_Properties_PropertyArray);
ZEPHIR_INIT(Test_Properties_ProtectedProperties);
ZEPHIR_INIT(Test_Properties_StaticProtectedProperties);
ZEPHIR_INIT(Test_Properties_StaticPublicProperties);
Expand Down
1 change: 1 addition & 0 deletions ext/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
#include "test/pregmatch.zep.h"
#include "test/properties/extendspublicproperties.zep.h"
#include "test/properties/privateproperties.zep.h"
#include "test/properties/propertyarray.zep.h"
#include "test/properties/protectedproperties.zep.h"
#include "test/properties/publicproperties.zep.h"
#include "test/properties/staticprotectedproperties.zep.h"
Expand Down
43 changes: 0 additions & 43 deletions ext/test/evaltest.c

This file was deleted.

15 changes: 0 additions & 15 deletions ext/test/evaltest.h

This file was deleted.

85 changes: 0 additions & 85 deletions ext/test/exitdie.c

This file was deleted.

21 changes: 0 additions & 21 deletions ext/test/exitdie.h

This file was deleted.

2 changes: 1 addition & 1 deletion ext/test/internalclasses.zep.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 0 additions & 65 deletions ext/test/issues.c

This file was deleted.

23 changes: 0 additions & 23 deletions ext/test/issues.h

This file was deleted.

46 changes: 0 additions & 46 deletions ext/test/oo/test.zep.c

This file was deleted.

15 changes: 0 additions & 15 deletions ext/test/oo/test.zep.h

This file was deleted.

Loading

0 comments on commit b2a3062

Please sign in to comment.