diff --git a/explorer/interpreter/type_checker.cpp b/explorer/interpreter/type_checker.cpp index 1cad4eb37828..4d8142135888 100644 --- a/explorer/interpreter/type_checker.cpp +++ b/explorer/interpreter/type_checker.cpp @@ -4487,7 +4487,7 @@ auto TypeChecker::DeclareClassDeclaration(Nonnull class_decl, ClassExtensibility::None) { return ProgramError(class_decl->source_loc()) << "Base class `" << base_class.value()->declaration().name() - << "` is `final` and cannot inherited. Add the `base` or " + << "` is `final` and cannot be inherited. Add the `base` or " "`abstract` class prefix to `" << base_class.value()->declaration().name() << "` to allow it to be inherited"; diff --git a/explorer/testdata/class/fail_extends_final_class.carbon b/explorer/testdata/class/fail_extends_final_class.carbon index 4cee9c1a6923..3ffdd137c5b4 100644 --- a/explorer/testdata/class/fail_extends_final_class.carbon +++ b/explorer/testdata/class/fail_extends_final_class.carbon @@ -14,7 +14,7 @@ class C { class D extends C { fn G() {} -// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/class/fail_extends_final_class.carbon:[[@LINE+1]]: Base class `C` is `final` and cannot inherited. Add the `base` or `abstract` class prefix to `C` to allow it to be inherited +// CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/class/fail_extends_final_class.carbon:[[@LINE+1]]: Base class `C` is `final` and cannot be inherited. Add the `base` or `abstract` class prefix to `C` to allow it to be inherited } fn Main() -> i32 {