# / / / / / / / / / / / / / / / / / / / / / 
# Bug trace -2-
# Nesting through "objscoped" evals
# - - - - - - - - - - - - - - - - - - - - - 
# stefan.sobernig@wu-wien.ac.at
# reproduceable/observe for 1.5.2/1.5.3

package req XOTcl
namespace import ::xotcl::*

Object o
o eval {set x [::xotcl::self]}
o set x
o eval {set x [::xotcl::self]::nested}
o set x
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd

# yields bus error
# - - -
# However, strange enough, when uncommenting lines 12-14
# the nested object is created without any
# fatal error?!

Object o
# o eval {set x [::xotcl::self]}
# o set x
# o eval {set x [::xotcl::self]::nested}
# o set x
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd

# works as expected
# - - -
# Injecting a requireNamespace makes
# the issue vanish, even with the 
# pre-nesting operations being
# evaluated

Object o
o eval {set x [::xotcl::self]}
o set x
o eval {set x [::xotcl::self]::nested}
o set x
o requireNamespace
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd

# works as expected
# - - -