Skip to content
Permalink
Browse files

fix #slotUsers, add test

fixes #3861
  • Loading branch information
MarcusDenker committed Jul 10, 2019
1 parent b83d1b7 commit 0c5a8e6fb81f5a51dbb7f9b8a09a2dfdca281d2d
Showing with 6 additions and 1 deletion.
  1. +1 −1 src/Slot-Core/Slot.class.st
  2. +5 −0 src/Slot-Tests/SlotTest.class.st
@@ -103,7 +103,7 @@ Slot class >> slotSetting: aBuilder [
Slot class >> slotUsers [
"all classes or traits that have slots of this kind"
^self environment allBehaviors
flatCollect: [ :class | class slots select: [ :slot | slot class == self ] ]
select: [ :class | class slots anySatisfy: [ :slot | slot class == self ] ]
]

{ #category : #comparing }
@@ -97,3 +97,8 @@ SlotTest >> testisUsed [
self assert: IndexedSlot isUsed. "subclasses are users"
self assert: ProcessLocalSlot isUsed. "references count as uses, too"
]

{ #category : #'tests - misc' }
SlotTest >> testslotUsers [
self assert: ToOneRelationSlot slotUsers first equals: SlotExampleMovie
]

0 comments on commit 0c5a8e6

Please sign in to comment.
You can’t perform that action at this time.