--- a/Class.st Mon Jan 27 12:16:09 1997 +0100
+++ b/Class.st Mon Jan 27 12:17:15 1997 +0100
@@ -1111,6 +1111,8 @@
|oldMethod|
+ oldMethod := self compiledMethodAt:newSelector.
+
CatchMethodRedefinitions ifTrue:[
"check for attempts to redefine a method
in a different package. Signal a resumable error if so.
@@ -1118,7 +1120,6 @@
when filing in alien code ....
(which we may want to forbit sometimes)
"
- oldMethod := self compiledMethodAt:newSelector.
oldMethod notNil ifTrue:[
oldMethod package ~= newMethod package ifTrue:[
"
@@ -1143,21 +1144,30 @@
]
].
+ "/ remember new->old association in the OldMethods dictionary (if non-nil)
+
OldMethods notNil ifTrue:[
- oldMethod := self compiledMethodAt:newSelector.
oldMethod notNil ifTrue:[
"/ oldMethod source:(oldMethod source).
OldMethods at:newMethod put:oldMethod
]
].
+ "/ remember in the projects overwritten dictionary
+
+ oldMethod notNil ifTrue:[
+ oldMethod package ~= newMethod package ifTrue:[
+ Project current rememberOverwrittenMethod:newMethod from:oldMethod
+ ]
+ ].
+
(super addSelector:newSelector withMethod:newMethod) ifTrue:[
self addChangeRecordForMethod:newMethod.
]
"Created: 29.10.1995 / 19:42:42 / cg"
"Modified: 9.9.1996 / 22:39:32 / stefan"
- "Modified: 7.11.1996 / 21:00:56 / cg"
+ "Modified: 27.1.1997 / 11:52:08 / cg"
!
basicAddSelector:newSelector withMethod:newMethod
@@ -4825,6 +4835,6 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.250 1997-01-24 22:08:11 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.251 1997-01-27 11:17:15 cg Exp $'
! !
Class initialize!