summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorapense <apense@users.noreply.github.com>2015-06-25 01:23:31 -0400
committerapense <apense@users.noreply.github.com>2015-06-25 01:23:31 -0400
commit1349687756ca1d43e03401868c870338d1090a26 (patch)
tree327d1ad054c24783ac2535fc957702fc1d7b0eb0
parentbdd5a8c05ed1a92a4eb3056b4852df695d622285 (diff)
downloadNim-1349687756ca1d43e03401868c870338d1090a26.tar.gz
Minor object documentation additions
-rw-r--r--doc/manual/types.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/manual/types.txt b/doc/manual/types.txt
index 81ae9d6b4..c8923bd44 100644
--- a/doc/manual/types.txt
+++ b/doc/manual/types.txt
@@ -575,6 +575,7 @@ the ``of`` operator can be used to determine the object's type.
     student: Student
     person: Person
   assert(student of Student) # is true
+  assert(student of Person) # also true
 
 Object fields that should be visible from outside the defining module, have to
 be marked by ``*``. In contrast to tuples, different object types are
@@ -593,6 +594,7 @@ an ``object`` type or a ``ref object`` type:
 .. code-block:: nim
   var student = Student(name: "Anton", age: 5, id: 3)
 
+Note that, unlike tuples, objects require the field names along with their values.
 For a ``ref object`` type ``system.new`` is invoked implicitly.