Skip to content

Commit

Permalink
php8.1: added final modifier for constants in class (#15)
Browse files Browse the repository at this point in the history
This case is already covered by the existing grammar, so no changes are required.
  • Loading branch information
i582 authored Jul 31, 2021
1 parent 689cca6 commit b256331
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/visitor/printer/printer_php8_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,13 @@ enum A implements B, C, D {
}
`)
}

func TestFinalConstantPHP81(t *testing.T) {
tester.NewParserPrintTestSuite(t).UsePHP8().Run(`<?php
class Foo {
public const X = "foo";
final public const X = "foo";
final private const X = "foo";
}
`)
}

0 comments on commit b256331

Please sign in to comment.