Class instance as argument.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-04-10 19:54:05 +02:00
parent 493fcd0e92
commit 0c2b2c9df5
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
class Test1 {
}
class Test2 extends Test1 {
}
class Program {
object $t;
void test(Test1 $t = new Test2) {
$this->t = $t;
var_dump($this->t);
}
void main() {
$this->test();
}
}

View File

@ -0,0 +1,2 @@
object(Test2) {
}