- 从CompilerBase.php移除平台检测相关方法(detectPlatform, initializeNewArchitecture, setCppCompiler) - 从CompilerBase.php移除代码格式化方法(formatCppCode)和save方法 - 从CompilerBase.php移除编译命令选项相关方法(getCompileCommandOptions等) - 在Translator.php中新增平台检测方法(detectPlatform) - 在Translator.php中新增代码格式化方法(formatCppCode)和save方法 - 在Translator.php中新增编译命令选项相关方法(getCompileCommandOptions等) - 移除CompilerBase.php中未使用的SsaBuilder导入 - 在Translator.php中新增必要的平台和编译器工厂类导入pull/1/head
parent
79d4c28c91
commit
96b4fefb58
2 changed files with 41 additions and 1 deletions
@ -0,0 +1,33 @@ |
|||||||
|
--TEST-- |
||||||
|
type hits |
||||||
|
--FILE-- |
||||||
|
<?php |
||||||
|
|
||||||
|
class Foo { |
||||||
|
public function __construct( |
||||||
|
private array $stmts |
||||||
|
) { |
||||||
|
} |
||||||
|
|
||||||
|
private function collectLabels(array $stmts): void |
||||||
|
{ |
||||||
|
var_dump($stmts); |
||||||
|
} |
||||||
|
|
||||||
|
public function buildCfg(): void |
||||||
|
{ |
||||||
|
$this->collectLabels($this->stmts); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
function main() |
||||||
|
{ |
||||||
|
$obj = new Foo(['Hello World']); |
||||||
|
$obj->buildCfg(); |
||||||
|
} |
||||||
|
?> |
||||||
|
--EXPECT-- |
||||||
|
array(1) { |
||||||
|
[0]=> |
||||||
|
string(11) "Hello World" |
||||||
|
} |
||||||
Loading…
Reference in new issue