You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When copying a class using the context menu 'Copy' command in the class browser, the class variables in the new class are 'entangled' with the old class. In other words, when the value of the class variable in the old class is changed, the value of the class variable in the new (copied) class also changes and vice versa.
To Reproduce
Steps to reproduce the behavior:
Open a class browser on the DateAndTime class.
Right-click on the class and select 'Copy'. Fill in a name for the copy, e.g. 'DateAndTimeCopy'.
Open a new playground window:
a. Type DateAndTime localTimeZone. and print it. If you're in time zone CET like me, this will print a LocalTimeZone(LT1:00).
b. Type DateAndTimeCopy localTimeZone. and print it. This will print the same value.
c. Type DateAndTime localTimeZone: (TimeZone offset: -8 hours). and do it.
d. Performs step 3b again. It should print a LocalTimeZone(LT1:00), but instead it prints a TimeZone(PST).
Expected behavior
Above, in step 3d, it should have printed a LocalTimeZone(LT1:00) since we didn't change the value of the local time zone class variable in the DateAndTimeCopy.
Screenshots
(Screenshot 1 - Class browser context menu 'Copy' command)
Describe the bug
When copying a class using the context menu 'Copy' command in the class browser, the class variables in the new class are 'entangled' with the old class. In other words, when the value of the class variable in the old class is changed, the value of the class variable in the new (copied) class also changes and vice versa.
To Reproduce
Steps to reproduce the behavior:
a. Type
DateAndTime localTimeZone.
and print it. If you're in time zone CET like me, this will printa LocalTimeZone(LT1:00)
.b. Type
DateAndTimeCopy localTimeZone.
and print it. This will print the same value.c. Type
DateAndTime localTimeZone: (TimeZone offset: -8 hours).
and do it.d. Performs step 3b again. It should print
a LocalTimeZone(LT1:00)
, but instead it printsa TimeZone(PST)
.Expected behavior
Above, in step 3d, it should have printed
a LocalTimeZone(LT1:00)
since we didn't change the value of the local time zone class variable in theDateAndTimeCopy
.Screenshots
(Screenshot 1 - Class browser context menu 'Copy' command)
(Screenshot 2 - Example results showing bug)
Version information:
Expected development cost
Zero. I will provide a fix.
Additional context
Pharo version 7.0 does not have this issue.
The text was updated successfully, but these errors were encountered: