From a83c535ed48edfe7559feb34c5428c81ec71df40 Mon Sep 17 00:00:00 2001 From: chloefeal <188809157+chloefeal@users.noreply.github.com> Date: Sat, 28 Dec 2024 02:42:18 +0800 Subject: [PATCH] docs: fix typos (#24573) Signed-off-by: chloefeal <188809157+chloefeal@users.noreply.github.com> (cherry picked from commit cd220fe3e11f2be6b78f48a259c539382c1e14a9) --- compiler/isolation_check.nim | 2 +- compiler/semtypinst.nim | 2 +- doc/backends.md | 2 +- doc/manual.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/isolation_check.nim b/compiler/isolation_check.nim index 17fbde29ee..0a27a4b815 100644 --- a/compiler/isolation_check.nim +++ b/compiler/isolation_check.nim @@ -166,7 +166,7 @@ proc containsVariable(n: PNode): bool = proc checkIsolate*(n: PNode): bool = if types.containsTyRef(n.typ): # XXX Maybe require that 'n.typ' is acyclic. This is not much - # worse than the already exisiting inheritance and closure restrictions. + # worse than the already existing inheritance and closure restrictions. case n.kind of nkCharLit..nkNilLit: result = true diff --git a/compiler/semtypinst.nim b/compiler/semtypinst.nim index 217488cb8d..6c81f8ac7b 100644 --- a/compiler/semtypinst.nim +++ b/compiler/semtypinst.nim @@ -344,7 +344,7 @@ proc replaceTypeVarsS(cl: var TReplTypeVars, s: PSym, t: PType): PSym = #[ We cannot naively check for symbol recursions, because otherwise - object types A, B whould share their fields! + object types A, B would share their fields! import tables diff --git a/doc/backends.md b/doc/backends.md index a8db83fb59..bf51e546ae 100644 --- a/doc/backends.md +++ b/doc/backends.md @@ -358,7 +358,7 @@ Memory management In the previous sections, the `NimMain()` function reared its head. Since JavaScript already provides automatic memory management, you can freely pass -objects between the two languages without problems. In C and derivate languages +objects between the two languages without problems. In C and derivative languages you need to be careful about what you do and how you share memory. The previous examples only dealt with simple scalar values, but passing a Nim string to C, or reading back a C string in Nim already requires you to be diff --git a/doc/manual.md b/doc/manual.md index d3c81aa78f..52f17369be 100644 --- a/doc/manual.md +++ b/doc/manual.md @@ -6264,7 +6264,7 @@ The default for symbols of entity `type`, `var`, `let` and `const` is `gensym`. For `proc`, `iterator`, `converter`, `template`, `macro`, the default is `inject`, but if a `gensym` symbol with the same name is defined in the same syntax-level scope, it will be `gensym` by default. -This can be overriden by marking the routine as `inject`. +This can be overridden by marking the routine as `inject`. If the name of the entity is passed as a template parameter, it is an `inject`'ed symbol: