Mercurial > projects > ddmd
comparison dmd/DsymbolExp.d @ 130:60bb0fe4563e
dmdfe 2.037 first main iteration
author | Eldar Insafutdinov <e.insafutdinov@gmail.com> |
---|---|
date | Thu, 09 Sep 2010 22:51:44 +0100 |
parents | e28b18c23469 |
children | e3afd1303184 |
comparison
equal
deleted
inserted
replaced
129:010eb8f0e18d | 130:60bb0fe4563e |
---|---|
32 import dmd.Loc; | 32 import dmd.Loc; |
33 import dmd.Scope; | 33 import dmd.Scope; |
34 import dmd.HdrGenState; | 34 import dmd.HdrGenState; |
35 import dmd.Dsymbol; | 35 import dmd.Dsymbol; |
36 import dmd.TOK; | 36 import dmd.TOK; |
37 import dmd.ErrorExp; | |
37 | 38 |
38 class DsymbolExp : Expression | 39 class DsymbolExp : Expression |
39 { | 40 { |
40 Dsymbol s; | 41 Dsymbol s; |
41 bool hasOverloads; | 42 bool hasOverloads; |
148 //printf("'%s' is a function\n", f.toChars()); | 149 //printf("'%s' is a function\n", f.toChars()); |
149 | 150 |
150 if (!f.type.deco) | 151 if (!f.type.deco) |
151 { | 152 { |
152 error("forward reference to %s", toChars()); | 153 error("forward reference to %s", toChars()); |
154 return new ErrorExp(); | |
153 } | 155 } |
154 return new VarExp(loc, f, hasOverloads); | 156 return new VarExp(loc, f, hasOverloads); |
155 } | 157 } |
156 o = s.isOverloadSet(); | 158 o = s.isOverloadSet(); |
157 if (o) | 159 if (o) |