Charj: fix ordering of namespace declarations
authorAaron Becker <akbecker@gmail.com>
Sat, 29 May 2010 00:12:56 +0000 (19:12 -0500)
committerAaron Becker <akbecker@gmail.com>
Sat, 29 May 2010 00:12:56 +0000 (19:12 -0500)
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;
     }