Changeset 1215

Show
Ignore:
Timestamp:
07/06/08 22:33:50 (3 months ago)
Author:
asterite
Message:

Fixed ticket #102, which I accidentaly broke when implementing the optimization stuff...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/descent.core/src/descent/internal/codeassist/CompletionEngine.java

    r1203 r1215  
    719719        doSemantic(); 
    720720         
    721       node.semantic(Scope.createGlobal(node.mod, semanticContext), semanticContext); 
     721//        node.semantic(Scope.createGlobal(node.mod, semanticContext), semanticContext); 
    722722         
    723723        if (node.mod != null) { 
     724            node.mod = node.mod.unlazy(semanticContext); 
    724725            if (node.selectiveName == null) { 
    725726                this.startPosition = actualCompletionPosition; 
     
    10951096         
    10961097        if (sym instanceof ClassDeclaration) { 
    1097             ClassDeclaration cd = (ClassDeclaration) sym; 
    1098             cd = cd.unlazy(semanticContext); 
     1098            ClassDeclaration cd = ((ClassDeclaration) sym).unlazy(semanticContext); 
    10991099             
    11001100            Declaration func = cd.ctor; 
     
    14051405                        TypeClass tc = (TypeClass) bc.type; 
    14061406                    loop: 
    1407                         for(Dsymbol member : tc.sym.members) { 
     1407                        for(Dsymbol member : tc.sym.unlazy(semanticContext).members) { 
    14081408                            if (member instanceof FuncDeclaration) { 
    14091409                                FuncDeclaration fd = (FuncDeclaration) member; 
     
    15011501        } else { 
    15021502            if (sym instanceof ScopeDsymbol) { 
    1503                 ScopeDsymbol scopeDsymbol = (ScopeDsymbol) sym
     1503                ScopeDsymbol scopeDsymbol = ((ScopeDsymbol) sym).unlazy(semanticContext)
    15041504                if (scopeDsymbol.members != null) { 
    15051505                    completeScopeDsymbol(scopeDsymbol, false /* not only statics */, includes); 
     
    15411541     
    15421542    private void completeScopeDsymbol(ScopeDsymbol sd, boolean onlyStatics, int includes) { 
     1543        sd = sd.unlazy(semanticContext); 
    15431544        if (sd instanceof ClassDeclaration) { 
    15441545            completeTypeClass((TypeClass) sd.type(), onlyStatics); 
     
    15541555 
    15551556    private Dsymbol getScopeSymbol(Scope scope) { 
     1557        scope.scopesym = scope.scopesym == null ? null : scope.scopesym.unlazy(semanticContext); 
    15561558        if (scope.scopesym == null || scope.scopesym.members == null 
    15571559                || scope.scopesym.members.isEmpty()) { 
     
    20022004            if (member instanceof StructDeclaration || 
    20032005                member instanceof EnumDeclaration) { 
    2004                 suggestMembers(((ScopeDsymbol) member).members, onlyStatics, flags, funcSignatures, includes); 
     2006                suggestMembers(((ScopeDsymbol) member).unlazy(semanticContext).members, onlyStatics, flags, funcSignatures, includes); 
    20052007            } 
    20062008            return; 
  • trunk/descent.core/src/descent/internal/compiler/parser/ScopeDsymbol.java

    r1203 r1215  
    345345        return null; 
    346346    } 
     347     
     348    public ScopeDsymbol unlazy(SemanticContext context) { 
     349        return this; 
     350    } 
    347351 
    348352}