#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Tue, 03 May 2016 18:03:56 +0200
changeset 16393 50c131b059ec
parent 16392 b85002e0a390
child 16394 90afc9e9d35f
#BUGFIX by cg class: SmalltalkCodeGeneratorTool comment/format in: #compile:forClass:inCategory:notifying: changed: #compile:forClass:inCategory: handling of errors when accepting in debugger
SmalltalkCodeGeneratorTool.st
--- a/SmalltalkCodeGeneratorTool.st	Tue May 03 18:03:37 2016 +0200
+++ b/SmalltalkCodeGeneratorTool.st	Tue May 03 18:03:56 2016 +0200
@@ -259,24 +259,24 @@
 !SmalltalkCodeGeneratorTool class methodsFor:'compilation'!
 
 compile:theCode forClass:aClass inCategory:cat
-    "install some code for a class.
+    "install some code for a class. Return the new method or nil.
      If refactory browser stuff is avaliable the refactory tools are used to support undo"
 
-    | parser |
+    | parser selector |
 
     super compile:theCode forClass:aClass inCategory:cat.
+
     parser := Parser parseMethodSpecification: theCode in: aClass ignoreErrors: true ignoreWarnings: true.
-    ^ parser selector notNil ifTrue:[
-        aClass compiledMethodAt: parser selector.
-    ] ifFalse:[ 
-        nil
+    (selector := parser selector notNil) ifTrue:[
+        ^ aClass compiledMethodAt: selector.
     ].
+    ^ nil
 
     "Created: / 05-08-2014 / 16:14:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 compile:theCode forClass:aClass inCategory:cat notifying: requestor
-    "install some code for a class.
+    "install some code for a class. Return the new method or nil.
      If refactory browser stuff is avaliable the refactory tools are used to support undo"
 
     CompilationErrorHandlerQuery