class-inheritance-hidden-inherited-member-access.azsl 554 B

123456789101112131415161718192021222324252627
  1. class A
  2. {
  3. bool a;
  4. };
  5. interface A2
  6. {
  7. int a();
  8. };
  9. class B : A, A2
  10. {
  11. int b;
  12. int a();
  13. };
  14. static B b, b2;
  15. // reveal access to hidden inherited fields using base-qualification of MAE's RHS:
  16. __azslc_print_message("@check predicate ");
  17. __azslc_print_symbol(typeof(b.A::a), __azslc_prtsym_least_qualified);
  18. __azslc_print_message(" == 'bool'\n");
  19. // using full base-qualification or RHS:
  20. __azslc_print_message("@check predicate ");
  21. __azslc_print_symbol(typeof(b.::A::a), __azslc_prtsym_least_qualified);
  22. __azslc_print_message(" == 'bool'\n");