TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
745 B
25 lines
745 B
<?php
|
|
|
|
class UniversalMethodCallTest extends \BaseTest
|
|
{
|
|
public function testUnknownMethodOnInt()
|
|
{
|
|
$this->exec("Cannot call method `unknownMethod()` on variable of type php::Int", 'universal-method-int-undefined.php');
|
|
}
|
|
|
|
public function testAddWithWrongArgCount()
|
|
{
|
|
$this->exec('Method `add()` expects exactly 1 argument(s), 0 given', 'universal-method-int-wrong-args.php');
|
|
}
|
|
|
|
public function testMutatingMethodOnNonVarExpr()
|
|
{
|
|
$this->exec('Cannot call mutating method `push()` on a non-variable expression', 'universal-method-mutating-expr.php');
|
|
}
|
|
|
|
public function testVoidMethodCall()
|
|
{
|
|
$this->exec('Cannot call method on void', 'void-method-call.php');
|
|
}
|
|
|
|
}
|
|
|