Charj: fix ordering of namespace declarations
[charm.git] / src / langs / charj / src / charj / translator / ClassSymbol.java
index 5a1637f585aa13c11577817d5433a1afb2f14de6..cf45b5e1156082e4942f852c3a9939c6d0ad62e0 100644 (file)
@@ -236,11 +236,11 @@ public class ClassSymbol extends SymbolWithScope implements Scope {
 
     public List<String> getPackageNames()
     {
-        List<String> list = new ArrayList<String>();
+        List<String> list = new LinkedList<String>();
         for(Scope currentScope = scope;
                 currentScope.getEnclosingScope() != null;
                 currentScope = currentScope.getEnclosingScope()) {
-            list.add(currentScope.getScopeName());
+            list.add(0, currentScope.getScopeName());
         }
         return list;
     }