1--TEST--
2Test typed properties error condition (type mismatch object)
3--FILE--
4<?php
5class Dummy {}
6
7new class(new Dummy) {
8    public stdClass $std;
9
10    public function __construct(Dummy $dummy) {
11        $this->std = $dummy;
12    }
13};
14?>
15--EXPECTF--
16Fatal error: Uncaught TypeError: Cannot assign Dummy to property class@anonymous::$std of type stdClass in %s:%d
17Stack trace:
18#0 %s(%d): class@anonymous->__construct(Object(Dummy))
19#1 {main}
20  thrown in %s on line %d
21