Type[] parents = sym.moduleClass().parents();
Type[] parents = (sym.isModule() ? sym.moduleClass(): sym).parents();
    public static Map subTemplates(Symbol root, SymbolBooleanFunction isDocumented) {	final Map subs = new HashMap();	foreach(root, new SymFun() { public void apply(Symbol sym) {	    if (sym.isClass() || sym.isModule()) {		Type[] parents = sym.moduleClass().parents();		for (int i = 0; i < parents.length; i++) {		    Symbol parentSymbol = parents[i].symbol();		    List subList = (List) subs.get(parentSymbol);		    if (subList == null) {			subList = new LinkedList();			subs.put(parentSymbol, subList);		    }		    subList.add(new Pair(sym, parents[i]));		}	    }	}	}, isDocumented);	return subs;    }