move trait alias modifier validation to parser ...
commitbfa0c01f69387b9908588b171c1b82f64925ff82
authorEugene Letuchy <eletuchy@fb.com>
Fri, 27 Dec 2013 07:42:46 +0000 (26 23:42 -0800)
committerSara Golemon <sgolemon@fb.com>
Sat, 28 Dec 2013 05:58:42 +0000 (27 21:58 -0800)
tree760e09e0cfd21fff3c89c9842a4b25fb22015ab0
parent25ad3889430beb35aa012259088271ea5cee6c04
move trait alias modifier validation to parser ...

* remove a few places where we were attempting to do a modifier check
   at trait flattening time (badly?) and at class* time (waaay too late)
 * fix the glaring hole where 'visibility' modifier was interpreted as
   'not `static`' as opposed to ##public|private|protected|final## due to the way
   hphp.y happened to reuse modifiers

Reviewed By: @ottoni

Differential Revision: D1111920
hphp/compiler/analysis/class_scope.cpp
hphp/compiler/analysis/core_code_error.inc
hphp/compiler/expression/modifier_expression.cpp
hphp/compiler/expression/modifier_expression.h
hphp/compiler/parser/parser.cpp
hphp/runtime/vm/class.cpp
hphp/test/ext/test_code_error.cpp
hphp/test/slow/traits/1981.php
hphp/test/slow/traits/1981.php.expect
hphp/test/slow/traits/2080.php.expectf