- 添加trait别名功能支持 - 修复trait使用语法错误提示信息 - 更新trait方法命名规则避免冲突 - 添加trait方法调用前缀处理 - 优化trait适应性代码结构 - 修复trait方法重写逻辑pull/1/head
parent
aea979fae1
commit
1658dc2bfa
4 changed files with 38 additions and 10 deletions
@ -0,0 +1,24 @@ |
||||
--TEST-- |
||||
Method conflict in traits |
||||
--FILE-- |
||||
<?php |
||||
trait THello1 |
||||
{ |
||||
static public function hello() |
||||
{ |
||||
echo 'Hello 2', PHP_EOL; |
||||
} |
||||
} |
||||
|
||||
class TraitsTest |
||||
{ |
||||
use THello1; |
||||
} |
||||
|
||||
function main() |
||||
{ |
||||
TraitsTest::hello(); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
Hello 2 |
||||
Loading…
Reference in new issue