mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
add test
This commit is contained in:
parent
e26e022428
commit
6578396afb
@ -275,6 +275,29 @@ class ReadonlyPropertyTest extends TestCase
|
||||
false,
|
||||
'8.1',
|
||||
],
|
||||
'readonlyPhpDocPromotedPropertyAssignOperator' => [
|
||||
'<?php
|
||||
|
||||
final class A
|
||||
{
|
||||
public function __construct(
|
||||
/**
|
||||
* @psalm-readonly
|
||||
*/
|
||||
private string $string,
|
||||
) {
|
||||
}
|
||||
|
||||
private function mutateString(): void
|
||||
{
|
||||
$this->string = "";
|
||||
}
|
||||
}',
|
||||
'error_message' => 'InaccessibleProperty',
|
||||
[],
|
||||
false,
|
||||
'8.1',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user