From 05754377621e43f32aafbeb149c1bd5927afd430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Sun, 2 Aug 2015 22:55:22 +0200 Subject: [PATCH] Improve discoverability of 'of' operator --- doc/manual/types.txt | 3 ++- lib/system.nim | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/manual/types.txt b/doc/manual/types.txt index 2eb034ba2d..44a20d0935 100644 --- a/doc/manual/types.txt +++ b/doc/manual/types.txt @@ -588,7 +588,8 @@ can also be defined with indentation instead of ``[]``: Objects provide many features that tuples do not. Object provide inheritance and information hiding. Objects have access to their type at runtime, so that -the ``of`` operator can be used to determine the object's type. +the ``of`` operator can be used to determine the object's type. The ``of`` operator +is similar to the ``instanceof`` operator in Java. .. code-block:: nim type diff --git a/lib/system.nim b/lib/system.nim index dd1a0721a6..383002fcfc 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -487,6 +487,7 @@ type ## See the full `exception hierarchy`_. ObjectConversionError* = object of Exception ## \ ## Raised if an object is converted to an incompatible object type. + ## You can use ``of`` operator to check if conversion will succeed. ## ## See the full `exception hierarchy`_. FloatingPointError* = object of Exception ## \