Aer/tests/multiple_inheritance.aer
belliash 55acf8111f
All checks were successful
The build was successful.
Assume private visibility for all class members by default.
In most (all?) modern OOP languages class members visibility is assumed to be private and programmer has to consciously set it to public or protected. PHP has the different approach what can cause a security flaws in written scripts. AerScript will not follow this way, as it seems to be conceptually broken.
2019-05-17 08:40:41 +02:00

63 lines
839 B
Plaintext

interface IntA {
public void test_a();
}
interface IntB {
public void test_b();
}
class TestA {
public void test_a() {
print("Hello world from TestA::test_a().\n");
}
}
class TestB {
public void test_b() {
print("Hello world from TestB::test_b().\n");
}
}
class TestC {
public void test_c() {
print("Hello world from TestC::test_c().\n");
}
}
class TestD {
public void test_a() {
print("Hello world from TestD::test_a().\n");
}
}
class TestE {
public void test_b() {
print("Hello world from TestE::test_b().\n");
}
}
class Program extends TestE, TestD, TestC, TestB, TestA implements IntA, IntB {
public void main() {
$this->test_a();
$this->test_b();
$this->test_c();
}
}