Mercurial > projects > ddmd
diff dmd/TypeEnum.d @ 137:09c858522d55
merge
author | Trass3r |
---|---|
date | Mon, 13 Sep 2010 23:29:00 +0200 |
parents | af1bebfd96a4 |
children | 0c8cc2a10f99 |
line wrap: on
line diff
--- a/dmd/TypeEnum.d Mon Sep 13 23:27:38 2010 +0200 +++ b/dmd/TypeEnum.d Mon Sep 13 23:29:00 2010 +0200 @@ -189,11 +189,20 @@ override MATCH constConv(Type to) { - assert(false); + if (equals(to)) + return MATCHexact; + if (ty == to.ty && sym == (cast(TypeEnum)to).sym && + MODimplicitConv(mod, to.mod)) + return MATCHconst; + return MATCHnomatch; } override Type toBasetype() { + if (sym.scope_) + { + sym.semantic(null); // attempt to resolve forward reference + } if (!sym.memtype) { debug writef("2: ");