Skip to content

Commit 190ebc0

Browse files
committed
Clarify why multiple modifiers can be parsed. Fix conflicts.
1 parent 0faf367 commit 190ebc0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/cases/parser/parameterPromotion2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
class X {
3-
// It's a syntax error to have more than one visibility modifier
3+
// Starting in php 8.1, it is a compile error rather than a syntax error to have more than one visibility modifier
44
public function __construct(
55
public protected $var
66
) {}

tests/cases/parser81/intersection_type.php.tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"Parameter": {
3535
"attributes": null,
3636
"visibilityToken": null,
37+
"modifiers": null,
3738
"questionToken": null,
3839
"typeDeclarationList": {
3940
"QualifiedNameList": {
@@ -103,6 +104,7 @@
103104
"Parameter": {
104105
"attributes": null,
105106
"visibilityToken": null,
107+
"modifiers": null,
106108
"questionToken": null,
107109
"typeDeclarationList": {
108110
"QualifiedNameList": {

0 commit comments

Comments
 (0)