[squeak-dev] Bug in #requiredSelectors?

Zulq Alam me at zulq.net
Fri Jul 25 12:27:49 UTC 2008


Is this a bug or am I doing something wrong? The last assertion fails, 
i.e. #requiredSelectors does not reflect removal if interest has been 
declared.

" Declare interest in String. "
RequiredSelectors current noteInterestOf: DynamicProtocols in: String.

" Prove that the method we're adding isn't already present. "
self assert: (String requiredSelectors includes: #requiredMethod) not.

" Add a method the implies a new required method. "
String compile: 'implyRequired self requiredMethod'.

" Prove that the implied required method is known. "
self assert: (String requiredSelectors includes: #requiredMethod).

" Remove the method. "
String removeSelector: #implyRequired.

" Prove that the required method is no longer implied. "
self assert: (String requiredSelectors includes: #requiredMethod) not.

" Lose interest. "
RequiredSelectors current lostInterest: DynamicProtocols in: String.

It seems like the cache is not being updated.

Thanks,
Zulq.




More information about the Squeak-dev mailing list