Browse Source

Class instance as argument.

pull/50/head
Rafal Kupiec 2 years ago
parent
commit
0c2b2c9df5
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 21 additions and 0 deletions
  1. +19
    -0
      tests/class_instance_arg.aer
  2. +2
    -0
      tests/class_instance_arg.exp

+ 19
- 0
tests/class_instance_arg.aer 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();
}
}

+ 2
- 0
tests/class_instance_arg.exp View File

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

Loading…
Cancel
Save