diff --git a/tests/implicitly_typed_declarations.aer b/tests/implicitly_typed_declarations.aer new file mode 100644 index 0000000..7d76b43 --- /dev/null +++ b/tests/implicitly_typed_declarations.aer @@ -0,0 +1,23 @@ +class Test { +} + +class Program { + + public void test() { + static auto $r = 3; + $r++; + var_dump($r); + } + + public void main() { + auto $a = 'test string'; + auto $b = new Test(); + auto $c = 6.5; + auto $d = true; + auto $e = NULL; + for(auto $i = 0; $i < 3; $i++) { + $this->test(); + } + var_dump($a, $b, $c, $d, $e); + } +} diff --git a/tests/implicitly_typed_declarations.exp b/tests/implicitly_typed_declarations.exp new file mode 100644 index 0000000..5b36cb8 --- /dev/null +++ b/tests/implicitly_typed_declarations.exp @@ -0,0 +1,9 @@ +int(4) +int(5) +int(6) +string(11 'test string') +object(Test) { + } +float(6.5) +bool(TRUE) +void(NULL) \ No newline at end of file