Skip to content

Commit

Permalink
Merge pull request #5075 from jecisc/Backport-5072-MCClassTraitDefini…
Browse files Browse the repository at this point in the history
…tion-should-take-category-into-account-for-equality

Backport-5072-MCClassTraitDefinition-should-take-category-into-account-for-equality
  • Loading branch information
Ducasse authored Nov 23, 2019
2 parents 1d40ea7 + 8447cbc commit fd8c156
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/Monticello/MCClassTraitDefinition.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@ MCClassTraitDefinition class >> baseTraitName: aString classTraitComposition: cl

{ #category : #comparing }
MCClassTraitDefinition >> = aDefinition [
^ (super = aDefinition)
and: [baseTrait = aDefinition baseTrait
and: [self classTraitCompositionString = aDefinition classTraitCompositionString]]


^ super = aDefinition
and: [ baseTrait = aDefinition baseTrait
and: [ self classTraitCompositionString = aDefinition classTraitCompositionString
and: [ category = aDefinition category ] ] ]
]

{ #category : #visiting }
Expand Down Expand Up @@ -91,8 +90,8 @@ MCClassTraitDefinition >> hash [
| hash |
hash := String stringHash: baseTrait initialHash: 0.
hash := String stringHash: self classTraitCompositionString initialHash: hash.
^hash

category ifNotNil: [ :cat | hash := String stringHash: cat initialHash: hash ].
^ hash
]

{ #category : #initialization }
Expand Down

0 comments on commit fd8c156

Please sign in to comment.