Harald Klimach  committed ea1ba6c

Backed out changeset fe222295e03a
No obvious reason for this change, even so declared as BUGFIX by Simon.
The interface and behavior of Aotus should be as consistent and predictable as
possible. Everywhere else keys overwrite postions, if both are given. There
is no reason, why this should be different for the addNode in the

  • Participants
  • Parent commits fe22229

Comments (0)

Files changed (1)

File source/aot_path_module.f90

   !! It contains a linked list of all nodes, as well as the name of the Lua
   !! script where this path is recorded in.
   type aot_path_type
-!    private
+    private
     !> Name of the file where this path object is found in.
     character(len=256) :: LuaFilename
       me%head => me%head%child
     end if
-    ! check for key and position
     if (present(pos)) then
       me%head%ID_kind = 'position'
       me%head%pos = pos
-    else if(present(key)) then
+    end if
+    ! Specified keys overwrite positions
+    if (present(key)) then
       me%head%ID_kind = 'key'
       me%head%key = key
     end if