php-src/Zend/tests/bug81192.phpt
Nikita Popov 1c6df2dffd Fixed bug #81192
Normally the filename is the current filename, but when traits
are involved, it might be a different one.
2021-08-12 14:35:13 +02:00

21 lines
395 B
PHP

--TEST--
Bug #81192: "Declaration should be compatible with" gives incorrect line number with traits
--FILE--
<?php
require __DIR__ . '/bug81192_trait.inc';
class A {
public function foo(): int {
return 2;
}
}
class B extends A {
use T;
}
?>
--EXPECTF--
Fatal error: Declaration of T::foo(): string must be compatible with A::foo(): int in %sbug81192_trait.inc on line 4