view dmd/WithScopeSymbol.d @ 165:25ede4f66bda

Temporarily disabled GC (again) because phobos fails to compile with it (looks like some ObjSymbols are being falsely collected, see Library.d:666) Getting rid of global state (i.e global and static variables) to allow running concurrent compilation
author korDen
date Thu, 30 Sep 2010 10:04:32 +0400
parents 010eb8f0e18d
children e3afd1303184
line wrap: on
line source

module dmd.WithScopeSymbol;

import dmd.common;
import dmd.ScopeDsymbol;
import dmd.WithStatement;
import dmd.Loc;
import dmd.Identifier;
import dmd.Dsymbol;

class WithScopeSymbol : ScopeDsymbol
{
    WithStatement withstate;

    this(WithStatement withstate)
	{
		this.withstate = withstate;
	}
	
    override Dsymbol search(Loc loc, Identifier ident, int flags)
	{
		// Acts as proxy to the with class declaration
		return withstate.exp.type.toDsymbol(null).search(loc, ident, 0);
	}

    override WithScopeSymbol isWithScopeSymbol() { return this; }
}