# Bug Report <!-- First, thank you for reporting a bug. That takes time and we appreciate that! --> | Subject | Details | | :------------- | :--------------------| | Rector version | last dev-main | | Installed as | composer dependency | ## Minimal PHP Code Causing Issue See https://getrector.com/demo/2919d329-78da-4c85-a82e-80f44b1906fa ```php <?php final class DemoFile { private int $sum { get => $this->a + $this->b; } public function __construct( private readonly int $a, private readonly int $b, ) {} public function getSum(): int { return $this->sum; } } ``` ### Responsible rules * `RemoveUnusedPromotedPropertyRector` ## Expected Behavior <!-- How should Rector change the code? Or should Rector skip it? --> Properties `$a` and `$b` used in property hook `$sum`
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/2919d329-78da-4c85-a82e-80f44b1906fa
Responsible rules
RemoveUnusedPromotedPropertyRectorExpected Behavior
Properties
$aand$bused in property hook$sum