File tree Expand file tree Collapse file tree 3 files changed +6
-1
lines changed
test/code/prettyPrinter/expr Expand file tree Collapse file tree 3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -577,7 +577,7 @@ protected function pExpr_ConstFetch(Expr\ConstFetch $node) {
577
577
}
578
578
579
579
protected function pExpr_ClassConstFetch (Expr \ClassConstFetch $ node ) {
580
- return $ this ->p ($ node ->class ) . ':: ' . $ this ->p ($ node ->name );
580
+ return $ this ->pDereferenceLhs ($ node ->class ) . ':: ' . $ this ->p ($ node ->name );
581
581
}
582
582
583
583
protected function pExpr_PropertyFetch (Expr \PropertyFetch $ node ) {
Original file line number Diff line number Diff line change @@ -1157,6 +1157,9 @@ protected function initializeFixupMap() {
1157
1157
'var ' => self ::FIXUP_DEREF_LHS ,
1158
1158
'name ' => self ::FIXUP_BRACED_NAME ,
1159
1159
],
1160
+ Expr \ClassConstFetch::class => [
1161
+ 'var ' => self ::FIXUP_DEREF_LHS ,
1162
+ ],
1160
1163
Scalar \Encapsed::class => [
1161
1164
'parts ' => self ::FIXUP_ENCAPSED ,
1162
1165
],
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ $A::{$b[$c]}();
10
10
A::$$b[$c]();
11
11
($a->b)();
12
12
(A::$b)();
13
+ ('a' . 'b')::X;
13
14
-----
14
15
!!php7
15
16
(function () {
@@ -21,3 +22,4 @@ $A::{$b[$c]}();
21
22
A::${$b}[$c]();
22
23
($a->b)();
23
24
(A::$b)();
25
+ ('a' . 'b')::X;
You can’t perform that action at this time.
0 commit comments