Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport-5072-MCClassTraitDefinition-should-take-category-into-account-for-equality #5075

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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