The Trunk: Monticello-ar.382.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-ar.382.mcz

commits-2
Andreas Raab uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-ar.382.mcz

==================== Summary ====================

Name: Monticello-ar.382
Author: ar
Time: 14 March 2010, 12:26:52.103 am
UUID: 9f58b4f0-4887-8949-a509-0280592f5635
Ancestors: Monticello-ar.381

Fix trait composition test in Monticello which could fail in some circumstances.

=============== Diff against Monticello-ar.381 ===============

Item was changed:
  ----- Method: MCClassDefinition>>createClass (in category 'installing') -----
  createClass
  | superClass class composition |
  superClass := superclassName == #nil ifFalse:
  [Smalltalk at: superclassName].
  [class := (ClassBuilder new)
  name: name
  inEnvironment: superClass environment
  subclassOf: superClass
  type: type
  instanceVariableNames: self instanceVariablesString
  classVariableNames: self classVariablesString
  poolDictionaries: self sharedPoolsString
  category: category.
  ] on: Warning, DuplicateVariableError do:[:ex| ex resume].
 
  "The following is written to support traits unloading"
  composition := Compiler evaluate: (self traitComposition ifNil:['{}']).
+ (composition isCollection and:[composition isEmpty and:[class traitComposition isEmpty]]) ifFalse:[
- (composition isEmpty and:[class traitComposition isEmpty]) ifFalse:[
  class setTraitComposition: composition asTraitComposition.
  ].
 
  composition := Compiler evaluate: (self classTraitComposition ifNil:['{}']).
+ (composition isCollection and:[composition isEmpty and:[class class traitComposition isEmpty]]) ifFalse:[
- (composition isEmpty and:[class class traitComposition isEmpty]) ifFalse:[
  class class setTraitComposition: composition asTraitComposition.
  ].
 
  ^class!