Skip to content

Commit

Permalink
Add test case
Browse files Browse the repository at this point in the history
Co-Authored-By: Vincent Langlet <VincentLanglet@users.noreply.github.com>
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter and VincentLanglet committed May 24, 2024
1 parent 0294324 commit 4b0690e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/PureAnnotationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,30 @@ class Date2{
Date2::tt();
',
],
'Issue #10974 - https://github.com/vimeo/psalm/issues/10974' => [
'code' => '<?php
class Foo
{
private int $int;
/** @psalm-pure */
public function __construct(int $int)
{
$this->int = $int;
}
}
class Factory
{
/** @psalm-pure */
public function getFoo(): Foo
{
return new Foo(42);
}
}
',
],
];
}

Expand Down

0 comments on commit 4b0690e

Please sign in to comment.