diff --git a/compiler/src/dmd/canthrow.d b/compiler/src/dmd/canthrow.d index 09d39ca6f1..5ffa4260e4 100644 --- a/compiler/src/dmd/canthrow.d +++ b/compiler/src/dmd/canthrow.d @@ -80,7 +80,7 @@ extern (C++) /* CT */ BE canThrow(Expression e, FuncDeclaration func, bool mustN if (!f.isDtorDeclaration()) errorSupplementalInferredAttr(f, 10, false, STC.nothrow_); - e.checkOverridenDtor(null, f, dd => dd.type.toTypeFunction().isnothrow, "not nothrow"); + e.checkOverriddenDtor(null, f, dd => dd.type.toTypeFunction().isnothrow, "not nothrow"); } else if (func) { diff --git a/compiler/src/dmd/cli.d b/compiler/src/dmd/cli.d index 597b7beec3..6bd8c17353 100644 --- a/compiler/src/dmd/cli.d +++ b/compiler/src/dmd/cli.d @@ -429,7 +429,7 @@ dmd -cov -unittest myprog.d q"{$(P Enables "include imports" mode, where the compiler will include imported modules in the compilation, as if they were given on the command line. By default, when this option is enabled, all imported modules are included except those in - druntime/phobos. This behavior can be overriden by providing patterns via `-i=`. + druntime/phobos. This behavior can be overridden by providing patterns via `-i=`. A pattern of the form `-i=` is an "inclusive pattern", whereas a pattern of the form `-i=-` is an "exclusive pattern". Inclusive patterns will include all module's whose names match the pattern, whereas exclusive patterns will exclude them. @@ -439,14 +439,14 @@ dmd -cov -unittest myprog.d $(P The default behavior of excluding druntime/phobos is accomplished by internally adding a set of standard exclusions, namely, `-i=-std -i=-core -i=-etc -i=-object`. Note that these - can be overriden with `-i=std -i=core -i=etc -i=object`.) + can be overridden with `-i=std -i=core -i=etc -i=object`.) $(P When a module matches multiple patterns, matches are prioritized by their component length, where a match with more components takes priority (i.e. pattern `foo.bar.baz` has priority over `foo.bar`).) $(P By default modules that don't match any pattern will be included. However, if at least one inclusive pattern is given, then modules not matching any pattern will - be excluded. This behavior can be overriden by usig `-i=.` to include by default or `-i=-.` to + be excluded. This behavior can be overridden by usig `-i=.` to include by default or `-i=-.` to exclude by default.) $(P Note that multiple `-i=...` options are allowed, each one adds a pattern.)}" diff --git a/compiler/src/dmd/compiler.d b/compiler/src/dmd/compiler.d index 403712dd2e..de326b2796 100644 --- a/compiler/src/dmd/compiler.d +++ b/compiler/src/dmd/compiler.d @@ -275,7 +275,7 @@ private struct MatcherNode * -i=-foo // include everything except modules that match "foo*" * -i=foo // only include modules that match "foo*" (exclude everything else) * --- - * Note that this default behavior can be overriden using the '.' module pattern. i.e. + * Note that this default behavior can be overridden using the '.' module pattern. i.e. * --- * -i=-foo,-. // this excludes everything * -i=foo,. // this includes everything except the default exclusions (-std,-core,-etc.-object) diff --git a/compiler/src/dmd/dsymbolsem.d b/compiler/src/dmd/dsymbolsem.d index a5cd63b1d4..71c18568f9 100644 --- a/compiler/src/dmd/dsymbolsem.d +++ b/compiler/src/dmd/dsymbolsem.d @@ -3963,13 +3963,13 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor hgs.fullQual = true; // https://issues.dlang.org/show_bug.cgi?id=23745 - // If the potentially overriden function contains errors, + // If the potentially overridden function contains errors, // inform the user to fix that one first if (fd.errors) { error(funcdecl.loc, "function `%s` does not override any function, did you mean to override `%s`?", funcdecl.toChars(), fd.toPrettyChars()); - errorSupplemental(fd.loc, "Function `%s` contains errors in its declaration, therefore it cannot be correctly overriden", + errorSupplemental(fd.loc, "Function `%s` contains errors in its declaration, therefore it cannot be correctly overridden", fd.toPrettyChars()); } else @@ -3985,7 +3985,7 @@ private extern(C++) final class DsymbolSemanticVisitor : Visitor { error(funcdecl.loc, "function `%s` does not override any function, did you mean to override %s `%s`?", funcdeclToChars, s.kind, s.toPrettyChars()); - errorSupplemental(funcdecl.loc, "Functions are the only declarations that may be overriden"); + errorSupplemental(funcdecl.loc, "Functions are the only declarations that may be overridden"); } } else diff --git a/compiler/src/dmd/dtoh.d b/compiler/src/dmd/dtoh.d index f00b8dba86..b9bbad0a7a 100644 --- a/compiler/src/dmd/dtoh.d +++ b/compiler/src/dmd/dtoh.d @@ -2450,7 +2450,7 @@ public: { debug (Debug_DtoH) mixin(traceVisit!e); - // Valid in most cases, others should be overriden below + // Valid in most cases, others should be overridden below // to use the appropriate operators (:: and ->) buf.writestring(e.toString()); } diff --git a/compiler/src/dmd/expression.d b/compiler/src/dmd/expression.d index 473efb8c99..440d0a520e 100644 --- a/compiler/src/dmd/expression.d +++ b/compiler/src/dmd/expression.d @@ -1242,7 +1242,7 @@ extern (C++) abstract class Expression : ASTNode if (!f.isDtorDeclaration()) errorSupplementalInferredAttr(f, /*max depth*/ 10, /*deprecation*/ false, STC.pure_); - checkOverridenDtor(sc, f, dd => dd.type.toTypeFunction().purity != PURE.impure, "impure"); + checkOverriddenDtor(sc, f, dd => dd.type.toTypeFunction().purity != PURE.impure, "impure"); return true; } return false; @@ -1261,7 +1261,7 @@ extern (C++) abstract class Expression : ASTNode * check = current check (e.g. whether it's pure) * checkName = the kind of check (e.g. `"pure"`) */ - extern (D) final void checkOverridenDtor(Scope* sc, FuncDeclaration f, + extern (D) final void checkOverriddenDtor(Scope* sc, FuncDeclaration f, scope bool function(DtorDeclaration) check, const string checkName ) { auto dd = f.isDtorDeclaration(); @@ -1314,7 +1314,7 @@ extern (C++) abstract class Expression : ASTNode field.loc.errorSupplemental(" - %s %s", field.type.toChars(), field.toChars()); if (fieldSd.dtor.isGenerated()) - checkOverridenDtor(sc, fieldSd.dtor, check, checkName); + checkOverriddenDtor(sc, fieldSd.dtor, check, checkName); else fieldSd.dtor.loc.errorSupplemental(" %.*s `%s.~this` is declared here", cast(int) checkName.length, checkName.ptr, fieldSd.toChars()); @@ -1505,7 +1505,7 @@ extern (C++) abstract class Expression : ASTNode errorSupplementalInferredAttr(f, /*max depth*/ 10, /*deprecation*/ false, STC.safe); .errorSupplemental(f.loc, "`%s` is declared here", prettyChars); - checkOverridenDtor(sc, f, dd => dd.type.toTypeFunction().trust > TRUST.system, "@system"); + checkOverriddenDtor(sc, f, dd => dd.type.toTypeFunction().trust > TRUST.system, "@system"); return true; } @@ -1569,7 +1569,7 @@ extern (C++) abstract class Expression : ASTNode f.errorSupplementalInferredAttr(/*max depth*/ 10, /*deprecation*/ false, STC.nogc); } - checkOverridenDtor(sc, f, dd => dd.type.toTypeFunction().isnogc, "non-@nogc"); + checkOverriddenDtor(sc, f, dd => dd.type.toTypeFunction().isnogc, "non-@nogc"); return true; } diff --git a/compiler/src/dmd/semantic3.d b/compiler/src/dmd/semantic3.d index a76496b277..aa04f935cd 100644 --- a/compiler/src/dmd/semantic3.d +++ b/compiler/src/dmd/semantic3.d @@ -1605,7 +1605,7 @@ private struct FuncDeclSem3 sc = s; } - /* Checks that the overriden functions (if any) have in contracts if + /* Checks that the overridden functions (if any) have in contracts if * funcdecl has an in contract. */ void checkInContractOverrides() diff --git a/compiler/test/fail_compilation/dtor_attributes.d b/compiler/test/fail_compilation/dtor_attributes.d index 21a12ed025..02d95586ea 100644 --- a/compiler/test/fail_compilation/dtor_attributes.d +++ b/compiler/test/fail_compilation/dtor_attributes.d @@ -30,7 +30,7 @@ struct HasDtor ~this() {} } -// The user-defined dtor is overriden by a generated dtor calling both +// The user-defined dtor is overridden by a generated dtor calling both // - HasDtor.~this // - Strict.~this struct Strict diff --git a/compiler/test/fail_compilation/fail19209.d b/compiler/test/fail_compilation/fail19209.d index ceede5e0ee..56b8581515 100644 --- a/compiler/test/fail_compilation/fail19209.d +++ b/compiler/test/fail_compilation/fail19209.d @@ -2,7 +2,7 @@ TEST_OUTPUT: --- fail_compilation/fail19209.d(16): Error: function `fail19209.Spammer.method()` does not override any function, did you mean to override variable `fail19209.Spam.method`? -fail_compilation/fail19209.d(16): Functions are the only declarations that may be overriden +fail_compilation/fail19209.d(16): Functions are the only declarations that may be overridden --- */ diff --git a/compiler/test/fail_compilation/fail23745.d b/compiler/test/fail_compilation/fail23745.d index eda9e1e63f..46d92f0fa1 100644 --- a/compiler/test/fail_compilation/fail23745.d +++ b/compiler/test/fail_compilation/fail23745.d @@ -5,7 +5,7 @@ TEST_OUTPUT: --- fail_compilation/fail23745.d(21): Error: undefined identifier `UndefinedType` fail_compilation/fail23745.d(14): Error: function `fun` does not override any function, did you mean to override `fail23745.A.fun`? -fail_compilation/fail23745.d(21): Function `fail23745.A.fun` contains errors in its declaration, therefore it cannot be correctly overriden +fail_compilation/fail23745.d(21): Function `fail23745.A.fun` contains errors in its declaration, therefore it cannot be correctly overridden --- */