From 0af5c55f55f969b40c058be8ccc8d43185994b5a Mon Sep 17 00:00:00 2001 From: Carson Radtke Date: Thu, 5 Jan 2023 14:01:32 -0500 Subject: [PATCH] Fix typo in extended final class error message (#2516) added the word "be" and updated test result. --- explorer/interpreter/type_checker.cpp | 2 +- explorer/testdata/class/fail_extends_final_class.carbon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 {