zephir
zephir copied to clipboard
Why does the compiler(parser) not give an error or warning if an abstract method(function) is not implemented by a subclass
From @ger-hard on February 22, 2018 16:13
Expected and Actual Behavior
When the class B in Zephir (which inherits from an abstract class A)vhas to implement at least one abstract methods, gives now at runtime the error:
"Cannot instantiate abstract class B"
What I expect that during the build the compiler(parser) will notice, or even gives an error which tells me that 1 - Class B must be abstract or 2 - Class B must implement the abstract method
Is this a 'bug'/missing feature, or is this a config setting which a have missed?
Details
- Zephir Parser version: 1.1.1
- PHP Version PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
- Operating System: ubuntu0.16.04.1
- Installation type: Compiling from source
- Compiler version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609
- Zephir version: 0.10.7-2917ebe8ae
Copied from original issue: phalcon/php-zephir-parser#35