mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
4591498df7
# Moved the freeing of overriden functions to a point after the check. # The new check comes after the normal inheritance check to give the first check # the opportunity to abort with a more detailed error. # Also fixed a small type in an unrelated test.
20 lines
376 B
PHP
20 lines
376 B
PHP
--TEST--
|
|
Bug #60153 (Interface method prototypes not enforced when implementd via traits.)
|
|
--FILE--
|
|
<?php
|
|
|
|
interface IFoo {
|
|
public function oneArgument($a);
|
|
}
|
|
|
|
trait TFoo {
|
|
public function oneArgument() {}
|
|
}
|
|
|
|
class C implements IFoo {
|
|
use TFoo;
|
|
}
|
|
|
|
--EXPECTF--
|
|
Fatal error: Declaration of C::oneArgument() must be compatible with IFoo::oneArgument($a) in %s on line %d
|