summaryrefslogtreecommitdiff
path: root/Zend/tests/object_types/missing_return_type_inheritance_in_class.phpt
blob: 023ae58634050cc93e90fef468d2fc84621ec004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Missing class method a object return type during inheritance
--FILE--
<?php

class One {
    public function a() : object {}
}

class Two extends One {
    public function a() {}
}
--EXPECTF--
Fatal error: Declaration of Two::a() must be compatible with One::a(): object in %s on line 9