- 移除CompilerBase中对stream/box类型的硬编码转换逻辑 - 在Preprocessor中添加stream/box到var类型的运行时转换 - 修改Translator中参数类型的C++代码生成逻辑 - 更新UniversalMethodCall中stream/box类型的参数匹配规则 - 添加测试用例验证数组元素链式调用的类型转换功能pull/1/head
parent
3f9c76df5d
commit
32ac23630a
5 changed files with 31 additions and 9 deletions
@ -0,0 +1,21 @@ |
||||
--TEST-- |
||||
var convert chained on array element |
||||
--FILE-- |
||||
<?php |
||||
function stream_write_test(stream $stream) { |
||||
$stream->write('world'); |
||||
} |
||||
|
||||
function main() |
||||
{ |
||||
$pair = stream_socket_pair(AF_UNIX, SOCK_STREAM, 0); |
||||
$pair[0]->toStream()->write('hello'); |
||||
var_dump($pair[1]->toStream()->read(5)); |
||||
|
||||
$pair[0]->toStream()->writeTest(); |
||||
var_dump($pair[1]->toStream()->read(5)); |
||||
} |
||||
?> |
||||
--EXPECT-- |
||||
string(5) "hello" |
||||
string(5) "world" |
||||
Loading…
Reference in new issue