mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
Fix typo in extended final class error message (#2516)
added the word "be" and updated test result.
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user