Mercurial > projects > ddmd
diff dmd/UnionDeclaration.d @ 23:460959608115
Branch merge.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Mon, 12 Apr 2010 17:00:08 +0100 |
parents | 427f8aa74d28 f2413c9183d1 |
children | 2e2a5c3f943a |
line wrap: on
line diff
--- a/dmd/UnionDeclaration.d Mon Apr 12 16:29:33 2010 +0400 +++ b/dmd/UnionDeclaration.d Mon Apr 12 17:00:08 2010 +0100 @@ -7,20 +7,27 @@ class UnionDeclaration : StructDeclaration { - this(Loc loc, Identifier id) + this(Loc loc, Identifier id) { super(loc, id); } - - Dsymbol syntaxCopy(Dsymbol s) + + Dsymbol syntaxCopy(Dsymbol s) { - assert(false); - } - - string kind() - { - assert(false); + UnionDeclaration ud; + + if (s) + ud = cast(UnionDeclaration)s; + else + ud = new UnionDeclaration(loc, ident); + StructDeclaration.syntaxCopy(ud); + return ud; } - UnionDeclaration isUnionDeclaration() { return this; } -} \ No newline at end of file + string kind() + { + return "union"; + } + + UnionDeclaration isUnionDeclaration() { return this; } +}