fail_abstract_method_final_impl.carbon 526 B

1234567891011121314151617181920
  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. abstract class A {
  8. abstract fn Foo[self: Self]();
  9. }
  10. class B {
  11. extend base: A;
  12. // CHECK:STDERR: COMPILATION ERROR: fail_abstract_method_final_impl.carbon:[[@LINE+1]]: Error declaring `B`: non abstract class should implement abstract method `Foo`.
  13. }
  14. fn Main() -> i32 {
  15. return 0;
  16. }