Class.st
changeset 2232 1d184023197f
parent 2206 6c8b4d9bf4b9
child 2245 d2ae001f71c9
--- a/Class.st	Thu Jan 23 00:15:43 1997 +0100
+++ b/Class.st	Thu Jan 23 02:08:18 1997 +0100
@@ -2338,7 +2338,7 @@
 basicFileOutDefinitionOn:aStream withNameSpace:forceNameSpace
     "append an expression on aStream, which defines myself."
 
-    |s owner ns nsName fullName|
+    |s owner ns nsName fullName superName cls|
 
     owner := self owningClass.
 
@@ -2371,7 +2371,21 @@
             and:[superclass owningClass isNil]) ifTrue:[
                 s := superclass nameWithoutPrefix
             ] ifFalse:[
-                s := superclass nameWithoutNameSpacePrefix
+                "/ a very special (rare) situation:
+                "/ my superclass resides in another nameSpace,
+                "/ but there is something else named like this
+                "/ to be found in my nameSpace (or a private class)
+
+                superName := superclass nameWithoutNameSpacePrefix asSymbol.
+                cls := self privateClassesAt:superName.
+                cls isNil ifTrue:[
+                    cls := self nameSpace at:superName.
+                ].
+                (cls notNil and:[cls ~~ superclass]) ifTrue:[
+                    s := superclass nameSpace name , '::' , superName
+                ] ifFalse:[
+                    s := superName
+                ]
             ]
         ]
     ].
@@ -2425,7 +2439,7 @@
     aStream cr
 
     "Created: 4.1.1997 / 20:38:16 / cg"
-    "Modified: 4.1.1997 / 21:06:42 / cg"
+    "Modified: 23.1.1997 / 02:06:18 / cg"
 !
 
 basicFileOutInstvarTypeKeywordOn:aStream
@@ -4744,6 +4758,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.246 1997-01-20 11:37:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.247 1997-01-23 01:08:18 cg Exp $'
 ! !
 Class initialize!