File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,14 @@ public function testBug12382(): void
232
232
'Method Bug12382\FinalHelloWorld2::dummy() is marked as impure but does not have any side effects. ' ,
233
233
33 ,
234
234
],
235
+ [
236
+ 'Method Bug12382\FinalHelloWorld3::dummy() is marked as impure but does not have any side effects. ' ,
237
+ 42 ,
238
+ ],
239
+ [
240
+ 'Method Bug12382\FinalHelloWorld4::dummy() is marked as impure but does not have any side effects. ' ,
241
+ 53 ,
242
+ ],
235
243
]);
236
244
}
237
245
Original file line number Diff line number Diff line change @@ -34,3 +34,23 @@ final public function dummy() : self{
34
34
return $ this ;
35
35
}
36
36
}
37
+
38
+ /** @final */
39
+ class FinalHelloWorld3
40
+ {
41
+ /** @phpstan-impure */
42
+ public function dummy () : self {
43
+ return $ this ;
44
+ }
45
+ }
46
+
47
+ class FinalHelloWorld4
48
+ {
49
+ /**
50
+ * @final
51
+ * @phpstan-impure
52
+ */
53
+ public function dummy () : self {
54
+ return $ this ;
55
+ }
56
+ }
You can’t perform that action at this time.
0 commit comments