Mercurial > projects > ddmd
diff dmd/AttribDeclaration.d @ 82:e95073e26356
fixed a hack I used as a lack of copy ctor in D
author | korDen |
---|---|
date | Mon, 30 Aug 2010 18:38:35 +0400 |
parents | 43073c7c7769 |
children | e28b18c23469 |
line wrap: on
line diff
--- a/dmd/AttribDeclaration.d Mon Aug 30 15:40:51 2010 +0200 +++ b/dmd/AttribDeclaration.d Mon Aug 30 18:38:35 2010 +0400 @@ -47,9 +47,7 @@ if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign) { // create new one for changes - newsc = new Scope(sc); - newsc.offset = sc.offset; - newsc.scopesym = sc.scopesym; + newsc = sc.clone(); newsc.flags &= ~SCOPE.SCOPEfree; newsc.stc = stc; newsc.linkage = linkage; @@ -75,9 +73,7 @@ if (stc != sc.stc || linkage != sc.linkage || protection != sc.protection || explicitProtection != sc.explicitProtection || structalign != sc.structalign) { // create new one for changes - newsc = new Scope(sc); - newsc.offset = sc.offset; - newsc.scopesym = sc.scopesym; + newsc = sc.clone(); newsc.flags &= ~SCOPE.SCOPEfree; newsc.stc = stc; newsc.linkage = linkage;