[Pkg] The Trunk: Traits-nice.300.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 1 23:32:48 UTC 2013

Nicolas Cellier uploaded a new version of Traits to project The Trunk:

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

Name: Traits-nice.300
Author: nice
Time: 2 November 2013, 12:30:54.426 am
UUID: fced9294-e4ef-4fb3-b2db-6e8da24a6e82
Ancestors: Traits-nice.299

Avoid spurious warnings in Trait>>rename: when an Undeclared isn't really referenced.

This may help some SUnit tests to pass.

=============== Diff against Traits-nice.299 ===============

Item was changed:
  ----- Method: Trait>>rename: (in category 'initialize') -----
  rename: aString 
  	"The new name of the receiver is the argument, aString."
  	| newName |
  	(newName := aString asSymbol) ~= self name
  		ifFalse: [^ self].
  	(self environment includesKey: newName)
  		ifTrue: [^ self error: newName , ' already exists'].
+ 	((self environment undeclared includesKey: newName)
+ 		and: [(self environment undeclared unreferencedKeys includes: newName) not])
- 	(self environment undeclared includesKey: newName)
  		ifTrue: [self inform: 'There are references to, ' , aString printString , '
  from Undeclared. Check them after this change.'].
  	self environment renameClass: self as: newName.
  	name := newName!

More information about the Packages mailing list