Skip to content

Commit

Permalink
The access to the class variables should be done through the class API
Browse files Browse the repository at this point in the history
  • Loading branch information
tesonep committed Jul 6, 2020
1 parent 2c4bdf8 commit 48d9c84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Commander2/CmCommandGroup.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ CmCommandGroup >> register: aCommandOrGroup before: anotherCommandOrGroup [
CmCommandGroup >> register: aCommandOrGroup insteadOf: anotherCommandOrGroup [
| commandToReplaceIndex |
commandToReplaceIndex := self entriesIndexOf: anotherCommandOrGroup.
((self commands collect: [:each | each name]) \ { (entries at: commandToReplaceIndex) } includes: aCommandOrGroup name)

((self commands collect: #name) \ { (entries at: commandToReplaceIndex) } includes: aCommandOrGroup name)
ifTrue: [ CmDuplicatedEntryName signalEntryNamed: aCommandOrGroup name ].

entries at: commandToReplaceIndex put: aCommandOrGroup
]

Expand Down
2 changes: 1 addition & 1 deletion src/Shift-ClassInstaller/ShiftClassInstaller.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ ShiftClassInstaller >> migrateClassTo: newClass [
(newClass classPool includesKey: oldAssociation key)
ifTrue: [
newAssociation := newClass classPool associationAt: oldAssociation key.
newAssociation value: oldAssociation value.
newClass classVarNamed: oldAssociation key put: oldAssociation value.
newClassVariableBindings add: newAssociation.
oldClassVariableBindings add: oldAssociation. ]].

Expand Down

0 comments on commit 48d9c84

Please sign in to comment.