Fix `Context >> #dbgVariables` to return `#()` for contexts without a method jv
authorJan Vrany <jan.vrany@labware.com>
Mon, 29 Jun 2020 22:39:06 +0100
branchjv
changeset 4655 0e104f727335
parent 4654 f001d36a3229
child 4656 a5dfa5a9cbca
Fix `Context >> #dbgVariables` to return `#()` for contexts without a method
extensions.st
--- a/extensions.st	Tue Jun 09 14:01:25 2020 +0100
+++ b/extensions.st	Mon Jun 29 22:39:06 2020 +0100
@@ -72,10 +72,10 @@
     "Return a list of variables for this context (as collection 
      of `DIVariable` instances) or nil if no debug info is recorded"         
 
-    ^ method dbgVariables
+    ^ method notNil ifTrue:[ method dbgVariables ] ifFalse:[ #() ]
 
     "Created: / 07-02-2019 / 08:45:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 27-05-2020 / 15:22:32 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 29-06-2020 / 22:26:33 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !Method methodsFor:'accessing'!