I wonder why the operation to the argument changed the value of t out of the function scope.
In the first example, since
t is an object and objects are always passed by reference, it is modified in the function.
In your second example,
t1=t1.t; assigns a string to the object. I would venture to say that since it is now a string and string variables are passed by value the original object is not changed and retains its object reference to the original.