mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-25 08:00:13 +01:00
Completing the work from #2761 by adding additional test cases. Closes #2512 --------- Co-authored-by: Maan2003 <manmeetmann2003@gmail.com> Co-authored-by: Aleksei Ermakov <alexey@emkv.me>
21 lines
526 B
Plaintext
21 lines
526 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
package ExplorerTest api;
|
|
|
|
abstract class A {
|
|
abstract fn Foo[self: Self]();
|
|
}
|
|
|
|
class B {
|
|
extend base: A;
|
|
// CHECK:STDERR: COMPILATION ERROR: fail_abstract_method_final_impl.carbon:[[@LINE+1]]: Error declaring `B`: non abstract class should implement abstract method `Foo`.
|
|
}
|
|
|
|
fn Main() -> i32 {
|
|
return 0;
|
|
}
|