Skip to content

Commit

Permalink
Correct the spelling of the word 'overridden'. (#5212)
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-oberhumer-forks authored and Araq committed Jan 11, 2017
1 parent d356c37 commit 8699372
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/options.nim
Expand Up @@ -200,7 +200,7 @@ proc getOutFile*(filename, ext: string): string =
proc getPrefixDir*(): string = proc getPrefixDir*(): string =
## Gets the prefix dir, usually the parent directory where the binary resides. ## Gets the prefix dir, usually the parent directory where the binary resides.
## ##
## This is overrided by some tools (namely nimsuggest) via the ``gPrefixDir`` ## This is overridden by some tools (namely nimsuggest) via the ``gPrefixDir``
## global. ## global.
if gPrefixDir != "": result = gPrefixDir if gPrefixDir != "": result = gPrefixDir
else: else:
Expand Down
6 changes: 3 additions & 3 deletions tests/generics/t88.nim
Expand Up @@ -8,7 +8,7 @@ proc new[V](t: typedesc[BaseClass], v: V): BaseClass[V] =
BaseClass[V](b: v) BaseClass[V](b: v)


proc baseMethod[V](v: BaseClass[V]): V = v.b proc baseMethod[V](v: BaseClass[V]): V = v.b
proc overridedMethod[V](v: BaseClass[V]): V = v.baseMethod proc overriddenMethod[V](v: BaseClass[V]): V = v.baseMethod


type type
ChildClass[V] = object of BaseClass[V] ChildClass[V] = object of BaseClass[V]
Expand All @@ -17,12 +17,12 @@ type
proc new[V](t: typedesc[ChildClass], v1, v2: V): ChildClass[V] = proc new[V](t: typedesc[ChildClass], v1, v2: V): ChildClass[V] =
ChildClass[V](b: v1, c: v2) ChildClass[V](b: v1, c: v2)


proc overridedMethod[V](v: ChildClass[V]): V = v.c proc overriddenMethod[V](v: ChildClass[V]): V = v.c


let c = ChildClass[string].new("Base", "Child") let c = ChildClass[string].new("Base", "Child")


assert c.baseMethod == "Base" assert c.baseMethod == "Base"
assert c.overridedMethod == "Child" assert c.overriddenMethod == "Child"




# bug #4528 # bug #4528
Expand Down

0 comments on commit 8699372

Please sign in to comment.