Skip to content
Permalink
Browse files

Use #copyClassSlotsFromExistingClass to copy class side inst var slots

  • Loading branch information
guillep committed Dec 21, 2018
1 parent a8e1865 commit 946950580abfccbb4cf92d1aa054fc448050ecfa
@@ -70,7 +70,8 @@ HEInstaller >> build: aHEClass [
sharedVariables: (self asClassVariables:aHEClass classVariables);
sharedPools: aHEClass sharedPools;
category: aHEClass category;
classSlots: (self asSlots: aHEClass classInstancevariables) ].
classSlots: (self asSlots: aHEClass classInstancevariables);
copyClassSlotsFromExistingClass ].

self processTraitsFrom: aHEClass in: newClass.

@@ -1161,7 +1161,8 @@ Class >> subclass: aSubclassSymbol layout: layoutClass slots: slotDefinition cl
layoutClass: layoutClass;
slots: slotDefinition;
sharedVariables: classVarDefinition;
category: aCategorySymbol ].
category: aCategorySymbol;
copyClassSlotsFromExistingClass ].

]

@@ -1182,7 +1183,8 @@ Class >> subclass: aSubclassSymbol layout: layoutClass slots: slotDefinition c
slots: slotDefinition;
sharedVariables: classVarDefinition;
sharedPools: someSharedPoolNames;
category: aCategorySymbol ].
category: aCategorySymbol;
copyClassSlotsFromExistingClass ].

]

@@ -1205,7 +1207,8 @@ Class >> subclass: aSubclassSymbol slots: slotDefinition classVariables: classVa
superclass: self;
slots: slotDefinition;
sharedVariables: classVarDefinition;
category: aCategorySymbol ]
category: aCategorySymbol;
copyClassSlotsFromExistingClass ]
]

{ #category : #'subclass creation - slots' }
@@ -1224,8 +1227,8 @@ Class >> subclass: aSubclassSymbol slots: slotDefinition classVariables: classVa
slots: slotDefinition;
sharedVariables: classVarDefinition;
sharedPools: someSharedPoolNames;
category: aCategorySymbol ].

category: aCategorySymbol;
copyClassSlotsFromExistingClass ]
]

{ #category : #'accessing class hierarchy' }
@@ -268,7 +268,8 @@ MCClassDefinition >> createClass [
classTraitComposition: self classTraitCompositionCompiled;
comment: comment stamp: commentStamp;
category: category;
environment: superClass environment ] ]
environment: superClass environment;
copyClassSlotsFromExistingClass ] ]
on: Warning , DuplicatedVariableError
do: [ :ex | ex resume ]
]
@@ -51,7 +51,8 @@ ClassFactoryWithOrganization >> newClassNamed: aString subclassOf: aClass instan
sharedVariablesFromString: classVarsString;
sharedPools: '';
category: category asSymbol;
environment: self organization environment ].
environment: self organization environment;
copyClassSlotsFromExistingClass ].
self createdClasses add: newClass.
^ newClass
]
@@ -78,7 +79,8 @@ ClassFactoryWithOrganization >> newSubclassOf: aClass instanceVariableNames: ivN
sharedVariablesFromString: classVarsString;
sharedPools: '';
category: category asSymbol;
environment: self organization environment ].
environment: self organization environment;
copyClassSlotsFromExistingClass ].
self createdClasses add: newClass.
^ newClass
]
@@ -13,7 +13,8 @@ Class >> addClassSlot: aSlot [
sharedVariablesFromString: self classVariablesString;
sharedPools: self sharedPoolsString;
category: self category;
environment: self environment]
environment: self environment;
copyClassSlotsFromExistingClass ]
]

{ #category : #'*Shift-ClassInstaller' }
@@ -92,7 +92,8 @@ Trait class >> named: aName uses: aTraitCompositionOrCollection slots: someSlots
category: aCategory;
traitComposition: aTraitCompositionOrCollection asTraitComposition;
classTraitComposition: aTraitCompositionOrCollection asTraitComposition classComposition;
classSlots: #() ].
classSlots: #();
copyClassSlotsFromExistingClass ].

self assert: [ trait class class = MetaclassForTraits ].
self assert: [ trait class superclass = Trait ].

0 comments on commit 9469505

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