diff --git a/src/Talents-Tests/TaAbstractTalentTest.class.st b/src/Talents-Tests/TaAbstractTalentTest.class.st index 96a03f4..7d2b377 100644 --- a/src/Talents-Tests/TaAbstractTalentTest.class.st +++ b/src/Talents-Tests/TaAbstractTalentTest.class.st @@ -9,9 +9,10 @@ Class { 'taTalentWithASlot', 'taTalentWithASlotInitialized', 'taAnotherInitializedSlot', - 'createdClasses' + 'createdClasses', + 'taTalentWithClassSide' ], - #category : 'Talents-Tests' + #category : #'Talents-Tests' } { #category : #'as yet unclassified' } @@ -85,6 +86,11 @@ TaAbstractTalentTest >> setUp [ anotherSlot := 93. '. + taTalentWithClassSide := self newTalent: #TaTalentWithClassSide with: #(). + taTalentWithClassSide class compile: ' + aClassMessage + ^ 42 + '. ] { #category : #running } diff --git a/src/Talents-Tests/TaSimpleTalentTests.class.st b/src/Talents-Tests/TaSimpleTalentTests.class.st index 6a5e793..db689ac 100644 --- a/src/Talents-Tests/TaSimpleTalentTests.class.st +++ b/src/Talents-Tests/TaSimpleTalentTests.class.st @@ -84,6 +84,18 @@ TaSimpleTalentTests >> testAddingSimpleTrait [ self deny: (Object canUnderstand: #someMessage). ] +{ #category : #'tests-talents' } +TaSimpleTalentTests >> testClassSideMethods [ + | x | + x := TaTestClassWithInstanceVariable new. + x anInstanceVariable: 23. + + x addTalent: taTalentWithClassSide. + + self assert: x class aClassMessage equals: 42. + +] + { #category : #'tests-talents' } TaSimpleTalentTests >> testCopyingObjectState [ | x | diff --git a/src/Talents/TalentInstaller.class.st b/src/Talents/TalentInstaller.class.st index c83328c..0ecd7b2 100644 --- a/src/Talents/TalentInstaller.class.st +++ b/src/Talents/TalentInstaller.class.st @@ -128,6 +128,7 @@ TalentInstaller >> extendClass: aClass with: aTalent [ builder superclass: aClass; traitComposition: aTalent; + classTraitComposition: aTalent classComposition; layoutClass: aClass classLayout class ]. talentedClasses at: newClass put: aTalent.