summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-12-17 10:13:13 +0100
committerGitHub <noreply@github.com>2016-12-17 10:13:13 +0100
commitf8a9382819bc4d7ff369cf3065769e971c29cb2d (patch)
tree9b8c7d89d7577d5036180e71213997a1d8bf4c3e
parent9ea97bbb2a35aec1cdc973c061642567bbf64aa6 (diff)
parent4acc84f081dfeed443292e7f6e2164bdca03bb1b (diff)
downloadNim-f8a9382819bc4d7ff369cf3065769e971c29cb2d.tar.gz
Merge pull request #5130 from jlp765/casted
Gramma change: casted or Casted to cast or Cast respectively
-rw-r--r--compiler/msgs.nim4
-rw-r--r--compiler/semexprs.nim4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 94b0bee00..e6a2b75a6 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -48,7 +48,7 @@ type
     errIndexOutOfBounds, errIndexTypesDoNotMatch, errBracketsInvalidForType,
     errValueOutOfSetBounds, errFieldInitTwice, errFieldNotInit,
     errExprXCannotBeCalled, errExprHasNoType, errExprXHasNoType,
-    errCastNotInSafeMode, errExprCannotBeCastedToX, errCommaOrParRiExpected,
+    errCastNotInSafeMode, errExprCannotBeCastToX, errCommaOrParRiExpected,
     errCurlyLeOrParLeExpected, errSectionExpected, errRangeExpected,
     errMagicOnlyInSystem, errPowerOfTwoExpected,
     errStringMayNotBeEmpty, errCallConvExpected, errProcOnlyOneCallConv,
@@ -229,7 +229,7 @@ const
     errExprHasNoType: "expression has no type",
     errExprXHasNoType: "expression \'$1\' has no type (or is ambiguous)",
     errCastNotInSafeMode: "\'cast\' not allowed in safe mode",
-    errExprCannotBeCastedToX: "expression cannot be casted to $1",
+    errExprCannotBeCastToX: "expression cannot be cast to $1",
     errCommaOrParRiExpected: "',' or ')' expected",
     errCurlyLeOrParLeExpected: "\'{\' or \'(\' expected",
     errSectionExpected: "section (\'type\', \'proc\', etc.) expected",
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index 723045fb0..c15a97c50 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -127,7 +127,7 @@ proc checkConvertible(c: PContext, castDest, src: PType): TConvStatus =
       discard
 
 proc isCastable(dst, src: PType): bool =
-  ## Checks whether the source type can be casted to the destination type.
+  ## Checks whether the source type can be cast to the destination type.
   ## Casting is very unrestrictive; casts are allowed as long as
   ## castDest.size >= src.size, and typeAllowed(dst, skParam)
   #const
@@ -223,7 +223,7 @@ proc semCast(c: PContext, n: PNode): PNode =
   addSon(result, copyTree(n.sons[0]))
   addSon(result, semExprWithType(c, n.sons[1]))
   if not isCastable(result.typ, result.sons[1].typ):
-    localError(result.info, errExprCannotBeCastedToX,
+    localError(result.info, errExprCannotBeCastToX,
                typeToString(result.typ))
 
 proc semLowHigh(c: PContext, n: PNode, m: TMagic): PNode =