fail_extend_twice.carbon 482 B

1234567891011121314151617181920212223
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. package ExplorerTest api;
  7. base class C {
  8. }
  9. base class D {
  10. }
  11. class E {
  12. extend base: C;
  13. // CHECK:STDERR: COMPILATION ERROR: fail_extend_twice.carbon:[[@LINE+1]]: At most one `extend base:` declaration in a class.
  14. extend base: D;
  15. }
  16. fn Main() -> i32 {
  17. return 0;
  18. }