fail_abstract_method_not_supported.carbon 552 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. class D {
  10. extend base: C;
  11. abstract fn Foo[self:Self]() -> i32 {
  12. return 1;
  13. // CHECK:STDERR: COMPILATION ERROR: fail_abstract_method_not_supported.carbon:[[@LINE+1]]: Error declaring `Foo`: `abstract` methods are not yet supported.
  14. }
  15. }
  16. fn Main() -> i32 {
  17. let d: D = {};
  18. return 0;
  19. }