[FIX] ClassBuilder problem

Brent Vukmer bvukmer at blackboard.com
Thu Feb 27 23:09:15 UTC 2003


Andreas --

Is the SUnit test that Hannes submitted, sufficient -- do you have any
others you'd like to add?

'From Squeak3.2 of 11 July 2002 [latest update: #4956] on 24 February
2003 at 4:22:07 pm'!
TestCase subclass: #BCCMaddInstVar
	instanceVariableNames: ''
	classVariableNames: ''
	poolDictionaries: ''
	category: 'SUnit-Tests'!


!BCCMaddInstVar methodsFor: 'as yet unclassified' stamp: 'hjh 2/24/2003
14:49'!
test03AddInstanceVarToClassDescription

	self assert: (ClassDescription isKindOf: ClassDescription).
	self assert: (Object isKindOf: Object).
	self deny: (OrderedCollection isKindOf: OrderedCollection).

	ClassDescription addInstVarName: 'myAdditionalInstVar'.

	ClassDescription removeInstVarName: 'myAdditionalInstVar'.! ! 

-----Original Message-----
From: Andreas Raab [mailto:andreas.raab at gmx.de]
Sent: Thursday, February 27, 2003 5:50 PM
To: 'The general-purpose Squeak developers list'
Subject: [FIX] ClassBuilder problem


Okay, restating the problem actually helped me to understand how to fix
it.

"Change Set:		MetaClassBuilderFix
Date:			27 February 2003
Author:			Andreas Raab

This change set fixes a rather obscure bug with reshaping the entire
class
hierarchy from ClassBuilder. The problem was introduced by accidentally
breaking the superclass/subclass invariant. The CS fixes this problem,
by
doing so actually removes some code and documents the critical
invariants
(both by putting comments into the methods affected and by making those
methods private which temporarily break the crucial invariants).

The class comment has been extended to document the fundamental
assumption
that ClassBuilder needs access to ALL of the subclasses no matter where
no
matter how they are created.
"



More information about the Squeak-dev mailing list