From a71654323d33a5a3dc41a68d5a791ff4ae6c9e69 Mon Sep 17 00:00:00 2001 From: hlaaftana <10591326+hlaaftana@users.noreply.github.com> Date: Sun, 26 Jan 2020 20:56:04 +0300 Subject: [PATCH] Clearer final objects error; fixes #13256 (#13257) --- compiler/semtypes.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 2dcee1420e..3b9cba835e 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")