fail_extend_member_class.carbon 654 B

12345678910111213141516171819202122
  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. // NOAUTOUPDATE
  6. package ExplorerTest api;
  7. class E {
  8. base class C {
  9. }
  10. // This should be allowed, but Explorer forbids it until the problem from
  11. // https://github.com/carbon-language/carbon-lang/issues/2994 can be fixed.
  12. // CHECK:STDERR: COMPILATION ERROR: fail_extend_member_class.carbon:[[@LINE+1]]: `extend base:` declarations after the first declaration in the class are not yet supported
  13. extend base: C;
  14. }
  15. fn Main() -> i32 {
  16. return 0;
  17. }