1--TEST--
2Overridden hooked property that adds get to set only property becomes invariant
3--FILE--
4<?php
5
6class A {
7    public int $prop {
8        set { echo __CLASS__ . '::' . __METHOD__, "\n"; }
9    }
10}
11
12class B extends A {
13    public int|string $prop {
14        get { echo __CLASS__ . '::' . __METHOD__, "\n"; return 42; }
15        set { echo __CLASS__ . '::' . __METHOD__, "\n"; }
16    }
17}
18
19?>
20===DONE===
21--EXPECT--
22===DONE===
23