Fix in inferences for infering Java class access.
Due to bug in classbuilder/namespace handling when both STX:LIBJAVA and
Java bridge is loaded, then references to JAVA global points to nil in stc
code instead of the global. Workaround this by using `Smalltalk at:#JAVA` instead
of plain `JAVA`.
--- a/SmallSense__SmalltalkInferencer.st Fri Oct 25 19:28:00 2013 +0100
+++ b/SmallSense__SmalltalkInferencer.st Sat Oct 26 10:52:07 2013 +0100
@@ -481,42 +481,6 @@
"Created: / 27-11-2011 / 15:49:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 08-10-2013 / 11:07:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-visitVariableNode:anObject
-
- | t |
-
- "Following code ensures, that all variable nodes refering same
- variable shares the inferred type"
- t := types at: anObject name ifAbsentPut:[Type unknown].
- anObject inferedType: t.
-
- anObject isGlobalVariable ifTrue:[
- | global class |
-
- global := Smalltalk at: anObject name asSymbol.
- "/ Special hack for JAVA - its actually a JavaPackage...
-
- global == JAVA ifTrue:[
- global := JavaPackage
- ].
- class := global class.
-
- global notNil ifTrue:[
- t addClass: class.
- t trustfullness: 100.
- ].
- ^self.
- ].
- anObject isClassVariable ifTrue:[
- t addClass: (class theNonMetaclass classVarAt: anObject name asSymbol) class.
- t trustfullness: 100.
- ^self.
- ].
-
- "Created: / 26-11-2011 / 13:31:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-10-2013 / 11:04:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SmalltalkInferencer::Phase2 methodsFor:'processing'!