Skip to content

Commit

Permalink
Merge pull request #7268 from MarcusDenker/SmallFixes-Rules
Browse files Browse the repository at this point in the history
SmallFixes-Rules
  • Loading branch information
Ducasse authored Sep 8, 2020
2 parents 6e8e872 + 82b1d5f commit 2f509ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/GeneralRules/ReEmptyExceptionHandlerRule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ReEmptyExceptionHandlerRule >> afterCheck: aNode mappings: mappingDict [
exception := mappingDict at: '`exception'.

exception isVariable ifFalse: [ ^ false ].
(class := Smalltalk classNamed: exception name) ifNil: [ ^ false ].
(class := aNode methodNode methodClass environment classNamed: exception name) ifNil: [ ^ false ].
(class includesBehavior: Exception) ifFalse: [ ^ false ].
(class includesBehavior: Notification) ifTrue: [ ^false ].

Expand Down
4 changes: 2 additions & 2 deletions src/GeneralRules/ReVariableAssignedLiteralRule.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ ReVariableAssignedLiteralRule class >> checksClass [
{ #category : #running }
ReVariableAssignedLiteralRule >> check: aClass forCritiquesDo: aCriticBlock [

(aClass slots, aClass classVariables) do: [ :variable |
aClass definedVariables do: [ :variable |
| assignmentNodes |
assignmentNodes := variable assignmentNodes.
assignmentNodes size = 1 ifFalse: [ ^ self ].
assignmentNodes first value isLiteralNode ifTrue: [
aCriticBlock cull: (self critiqueFor: aClass about: variable name) ]].
aCriticBlock cull: (self critiqueFor: aClass about: variable name) ]]
]

{ #category : #'running-helpers' }
Expand Down

0 comments on commit 2f509ea

Please sign in to comment.