Mercurial > projects > ddmd
comparison dmd/DtorDeclaration.d @ 179:cd48cb899aee
Updated to dmd2.040
author | korDen |
---|---|
date | Sun, 17 Oct 2010 20:56:07 +0400 |
parents | e3afd1303184 |
children | b0d41ff5e0df |
comparison
equal
deleted
inserted
replaced
178:e3afd1303184 | 179:cd48cb899aee |
---|---|
46 AggregateDeclaration ad = parent.isAggregateDeclaration(); | 46 AggregateDeclaration ad = parent.isAggregateDeclaration(); |
47 if (!ad) | 47 if (!ad) |
48 { | 48 { |
49 error("destructors are only for class/struct/union definitions, not %s %s", parent.kind(), parent.toChars()); | 49 error("destructors are only for class/struct/union definitions, not %s %s", parent.kind(), parent.toChars()); |
50 } | 50 } |
51 else if (ident == Id.dtor) | 51 else if (ident == Id.dtor && semanticRun < PASSsemantic) |
52 ad.dtors.push(this); | 52 ad.dtors.push(this); |
53 | 53 |
54 type = new TypeFunction(null, Type.tvoid, false, LINK.LINKd); | 54 if (!type) |
55 type = new TypeFunction(null, Type.tvoid, false, LINK.LINKd); | |
55 | 56 |
56 sc = sc.push(); | 57 sc = sc.push(); |
57 sc.stc &= ~STCstatic; // not a static destructor | 58 sc.stc &= ~STCstatic; // not a static destructor |
58 sc.linkage = LINK.LINKd; | 59 sc.linkage = LINK.LINKd; |
59 | 60 |