#FEATURE
authorClaus Gittinger <cg@exept.de>
Wed, 27 Jan 2016 15:23:26 +0100
changeset 3703 1856611911f6
parent 3698 3239ade21926
child 3704 b1412a04e935
#FEATURE class: Parser changed: #primary_identifier when accessing a namespace variable, check if the namespace is an autoloaded class.
Parser.st
--- a/Parser.st	Sat Jan 23 04:57:24 2016 +0000
+++ b/Parser.st	Wed Jan 27 15:23:26 2016 +0100
@@ -7787,7 +7787,7 @@
 
     (tokenType == #'::') ifTrue:[
         globlName := rawName := varName.
-
+    
         "is it in a namespace ?"
         nameSpace := self findNameSpaceWith:globlName.
         nameSpace notNil ifTrue:[
@@ -7833,6 +7833,11 @@
                         nameSpaceGlobal isBehavior ifFalse:[
                             self parseError:('invalid nameSpace: ' , nameSpace)  position:pos1 to:tokenPosition-1.
                         ] ifTrue:[
+                            nameSpaceGlobal isLoaded ifFalse:[
+                                "/ check, if the namespace is something autoloaded.
+                                "/ because then, the private name may appear
+                                nameSpaceGlobal autoload.
+                            ].    
                             nameSpaceGlobal isLoaded ifTrue:[
                                 (nameSpaceGlobal privateClassesAt:varName asSymbol) isNil ifTrue:[
                                     rawName := rawName asSymbol.