Fix typo in extended final class error message (#2516)

added the word "be" and updated test result.
This commit is contained in:
Carson Radtke
2023-01-05 11:01:32 -08:00
committed by GitHub
parent d61531c82c
commit 0af5c55f55
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4487,7 +4487,7 @@ auto TypeChecker::DeclareClassDeclaration(Nonnull<ClassDeclaration*> 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";
+1 -1
View File
@@ -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 {