comparison dmd/enum.c @ 1623:1d48eced441f

Merge DMD r317: bugzilla 3611 Enum forward referencing regression --- dmd/enum.c | 17 +++++++++++++++-- dmd/mtype.c | 4 ++++ 2 files changed, 19 insertions(+), 2 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:22 -0300
parents 1b24e9c7cc26
children 6c36e3f49b28
comparison
equal deleted inserted replaced
1622:a542ef277a84 1623:1d48eced441f
55 uinteger_t number; 55 uinteger_t number;
56 Type *t; 56 Type *t;
57 Scope *sce; 57 Scope *sce;
58 58
59 //printf("EnumDeclaration::semantic(sd = %p, '%s')\n", sc->scopesym, sc->scopesym->toChars()); 59 //printf("EnumDeclaration::semantic(sd = %p, '%s')\n", sc->scopesym, sc->scopesym->toChars());
60 if (symtab) // if already done
61 return;
62 if (!memtype) 60 if (!memtype)
63 memtype = Type::tint32; 61 memtype = Type::tint32;
62
63 if (symtab) // if already done
64 { if (!scope)
65 return; // semantic() already completed
66 }
67 else
68 symtab = new DsymbolTable();
69
70 Scope *scx = NULL;
71 if (scope)
72 { sc = scope;
73 scx = scope; // save so we don't make redundant copies
74 scope = NULL;
75 }
76
64 if (sc->stc & STCdeprecated) 77 if (sc->stc & STCdeprecated)
65 isdeprecated = 1; 78 isdeprecated = 1;
66 79
67 parent = sc->scopesym; 80 parent = sc->scopesym;
68 memtype = memtype->semantic(loc, sc); 81 memtype = memtype->semantic(loc, sc);