1--TEST--
2Promoted readonly property must have type
3--FILE--
4<?php
5
6class Foo {
7    public function __construct(
8        public readonly $bar
9    ) {}
10}
11
12?>
13--EXPECTF--
14Fatal error: Readonly property Foo::$bar must have type in %s on line %d
15