[Pkg] The Trunk: Kernel-fbs.791.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 17 18:26:50 UTC 2013

Frank Shearar uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-fbs.791
Author: fbs
Time: 11 July 2013, 8:58:41.496 pm
UUID: a70ef892-e4ef-1a46-9aed-c95fd0ee4cd5
Ancestors: Kernel-fbs.790

Allow the loading of classes with nil environment. (This indicates that a class tracks its superclass' environment.)

=============== Diff against Kernel-fbs.790 ===============

Item was changed:
  ----- Method: Class>>declare: (in category 'initialize-release') -----
  declare: varString 
  	"Declare class variables common to all instances. Answer whether 
  	recompilation is advisable."
  	| newVars conflicts |
  	newVars := 
  		(Scanner new scanFieldNames: varString)
  			collect: [:x | x asSymbol].
  	newVars do:
  		[:var | var first canBeGlobalVarInitial
  			ifFalse: [self error: var, ' class variable name should be capitalized; proceed to include anyway.']].
  	conflicts := false.
  	classPool == nil 
  		ifFalse: [(classPool keys reject: [:x | newVars includes: x]) do: 
  					[:var | self removeClassVarName: var]].
  	(newVars reject: [:var | self classPool includesKey: var])
  		do: [:var | "adding"
  			"check if new vars defined elsewhere"
  			(self canFindWithoutEnvironment: var) ifTrue: [
  					(DuplicateVariableError new)
  						superclass: superclass; "fake!!!!!!"
  						variable: var;
  						signal: var, ' is already defined'.
  					conflicts := true]].
  	newVars size > 0
  			[classPool := self classPool.
  			"in case it was nil"
+ 			newVars do: [:var | classPool declare: var from: self environment undeclared]].
- 			newVars do: [:var | classPool declare: var from: environment undeclared]].

More information about the Packages mailing list