--- a/SmallSense__SmalltalkInferencer.st Fri Apr 29 15:20:39 2016 +0200
+++ b/SmallSense__SmalltalkInferencer.st Tue May 03 15:52:52 2016 +0200
@@ -479,26 +479,26 @@
"We don't have to infer types for global/class variables"
(rec isGlobalVariable or:[rec isClassVariable]) ifTrue:[
"/ Check for pattern: `Smalltalk at: #ClassName`
- (rec name = 'Smalltalk' and:[anObject arguments conform:[:node | node isConstant ] ]) ifTrue:[
+ (rec name = 'Smalltalk' and:[anObject arguments conform:[:node | node isLiteral ] ]) ifTrue:[
| result |
"Here, evaluate the node, but only for certain known selectors!!
(think of selector #exit :-) - you'll laugh, but it hit me back hard
couple times...
"
- (#( at:
- classNamed:
- "/ add more...
+ (#( at:
+ classNamed:
+ "/ add more...
) includes:anObject selector) ifTrue:[
- [
- result := anObject evaluate.
- result notNil ifTrue:[
- anObject inferedType: ((Type withClass: result class) trustfullness: 100)
- ]
- ] on: Error do:[
- "/pass
- ]
- ]
+ [
+ result := anObject evaluate.
+ result notNil ifTrue:[
+ anObject inferedType: ((Type withClass: result class) trustfullness: 100)
+ ]
+ ] on: Error do:[
+ "/pass
+ ]
+ ]
].
] ifFalse:[
(sends at: rec name ifAbsentPut:[Set new]) add: anObject selector.