Allow parameter promotion in constructors
commitef99ac34453db55969564d4eb3d738dbd599c1ff
authorDario Russi <drussi@fb.com>
Sun, 23 Jun 2013 18:05:45 +0000 (23 11:05 -0700)
committerSara Golemon <sgolemon@fb.com>
Sat, 6 Jul 2013 18:12:21 +0000 (6 11:12 -0700)
tree45c1b8ad84e3f2e9a932c5ff54e5e816c99e8b0a
parent047ef325bb24290fe447a91671e2e41ea11a87a2
Allow parameter promotion in constructors

Extend PHP to allow constructor paramters to be promoted to fields. Reduce plumbing of class declaration and helps productivity.
42 files changed:
hphp/compiler/expression/parameter_expression.cpp
hphp/compiler/expression/parameter_expression.h
hphp/compiler/parser/hphp.tab.cpp
hphp/compiler/parser/parser.cpp
hphp/compiler/parser/parser.h
hphp/compiler/statement/class_statement.cpp
hphp/compiler/statement/class_statement.h
hphp/compiler/statement/interface_statement.cpp
hphp/compiler/statement/interface_statement.h
hphp/compiler/statement/method_statement.cpp
hphp/compiler/statement/method_statement.h
hphp/compiler/type_annotation.cpp
hphp/compiler/type_annotation.h
hphp/runtime/debugger/cmd/cmd_heaptrace.cpp
hphp/runtime/debugger/cmd/cmd_heaptrace.h
hphp/test/quick/ctor_param_promotion.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion.php.expect [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_abstract.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_abstract.php.expectf [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_generic.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_generic.php.expectf [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_generic1.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_generic1.php.expectf [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_genericgood.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_genericgood.php.expect [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_interface.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_interface.php.expectf [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_redeclaration.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_redeclaration.php.expectf [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_trait.php [new file with mode: 0644]
hphp/test/quick/ctor_param_promotion_trait.php.expectf [new file with mode: 0644]
hphp/test/quick/method_param_promotion_error.php [new file with mode: 0644]
hphp/test/quick/method_param_promotion_error.php.expectf [new file with mode: 0644]
hphp/test/slow/ctor_param_promotion_bad_mod.php [new file with mode: 0644]
hphp/test/slow/ctor_param_promotion_bad_mod.php.expectf [new file with mode: 0644]
hphp/test/slow/function_no_param_modifier.php [new file with mode: 0644]
hphp/test/slow/function_no_param_modifier.php.expectf [new file with mode: 0644]
hphp/util/parser/hphp.y
hphp/util/parser/parser.cpp
hphp/util/parser/parser.h
hphp/util/parser/scanner.h
hphp/util/parser/test/parser.h