summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2020-01-26 20:56:04 +0300
committerAndreas Rumpf <rumpf_a@web.de>2020-01-26 18:56:04 +0100
commita71654323d33a5a3dc41a68d5a791ff4ae6c9e69 (patch)
treebf4c64c7a4d08301cceae046dc62a46fac5ecc05 /compiler
parente7744b0909f90b16bb49cdbf8c99f6b1f8e1d23e (diff)
downloadNim-a71654323d33a5a3dc41a68d5a791ff4ae6c9e69.tar.gz
Clearer final objects error; fixes #13256 (#13257)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semtypes.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim
index 2dcee1420..3b9cba835 100644
--- a/compiler/semtypes.nim
+++ b/compiler/semtypes.nim
@@ -851,7 +851,8 @@ proc semObjectNode(c: PContext, n: PNode, prev: PType; isInheritable: bool): PTy
       else:
         if concreteBase.kind != tyError:
           localError(c.config, n[1].info, "inheritance only works with non-final objects; " &
-             "to enable inheritance write '" & typeToString(realBase) & " of RootObj'")
+             "for " & typeToString(realBase) & " to be inheritable it must be " &
+             "'object of RootObj' instead of 'object'")
         base = nil
         realBase = nil
   if n.kind != nkObjectTy: internalError(c.config, n.info, "semObjectNode")