From 6cff927c81041a4014be7bb3ed87820dc02099bd Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 2 Apr 2020 18:44:35 +0200 Subject: [PATCH] Do not update protocols if they are extensions --- src/Chanel/Chanel.class.st | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Chanel/Chanel.class.st b/src/Chanel/Chanel.class.st index 4dff9f4..cc438b9 100644 --- a/src/Chanel/Chanel.class.st +++ b/src/Chanel/Chanel.class.st @@ -173,7 +173,7 @@ Chanel >> clean [ { #category : #protocols } Chanel >> cleanCloseProtocols [ | methods | - methods := self localMethods. + methods := self localMethodsWithoutExtensions. self protocolsToCleanMap keysAndValuesDo: [ :olds :new | methods do: [ :meth | (olds includes: meth protocol) ifTrue: [ meth protocol: new ] ] ] ] @@ -201,7 +201,7 @@ Chanel >> cleanEqualityTest [ { #category : #protocols } Chanel >> cleanProtocols [ | methods protocolsMap | - methods := self localMethods. + methods := self localMethodsWithoutExtensions. self cleanCloseProtocols. @@ -299,6 +299,11 @@ Chanel >> localMethods [ ^ (packages flatCollect: #methods) reject: #isFromTrait ] +{ #category : #accessing } +Chanel >> localMethodsWithoutExtensions [ + ^ self localMethods reject: #isExtension +] + { #category : #accessing } Chanel >> methodsInSpecificProtocolMap [ ^ self class methodsInSpecificProtocolMap