comparison dmd/expression.c @ 1619:c61782a76dff

Merge DMD r304: refactor invariant => immutable --- dmd/cast.c | 2 +- dmd/declaration.c | 2 +- dmd/declaration.h | 3 +-- dmd/doc.c | 2 +- dmd/expression.c | 6 +++--- dmd/interpret.c | 4 ++-- dmd/mtype.c | 2 +- dmd/mtype.h | 2 +- dmd/parse.c | 4 ++-- dmd/struct.c | 2 +- 10 files changed, 14 insertions(+), 15 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:22 -0300
parents a87f1d6ff48e
children fb2e6707ad17
comparison
equal deleted inserted replaced
1618:a87f1d6ff48e 1619:c61782a76dff
4081 } 4081 }
4082 v->checkNestedReference(sc, loc); 4082 v->checkNestedReference(sc, loc);
4083 #if DMDV2 4083 #if DMDV2
4084 if (sc->func && sc->func->isPure() && !sc->intypeof) 4084 if (sc->func && sc->func->isPure() && !sc->intypeof)
4085 { 4085 {
4086 if (v->isDataseg() && !v->isInvariant()) 4086 if (v->isDataseg() && !v->isImmutable())
4087 error("pure function '%s' cannot access mutable static data '%s'", sc->func->toChars(), v->toChars()); 4087 error("pure function '%s' cannot access mutable static data '%s'", sc->func->toChars(), v->toChars());
4088 } 4088 }
4089 #endif 4089 #endif
4090 } 4090 }
4091 #if 0 4091 #if 0
4761 tded = targ; 4761 tded = targ;
4762 break; 4762 break;
4763 4763
4764 case TOKinvariant: 4764 case TOKinvariant:
4765 case TOKimmutable: 4765 case TOKimmutable:
4766 if (!targ->isInvariant()) 4766 if (!targ->isImmutable())
4767 goto Lno; 4767 goto Lno;
4768 tded = targ; 4768 tded = targ;
4769 break; 4769 break;
4770 4770
4771 case TOKshared: 4771 case TOKshared:
7424 { case 0: 7424 { case 0:
7425 break; 7425 break;
7426 case MODconst: 7426 case MODconst:
7427 buf->writestring(Token::tochars[TOKconst]); 7427 buf->writestring(Token::tochars[TOKconst]);
7428 break; 7428 break;
7429 case MODinvariant: 7429 case MODimmutable:
7430 buf->writestring(Token::tochars[TOKimmutable]); 7430 buf->writestring(Token::tochars[TOKimmutable]);
7431 break; 7431 break;
7432 case MODshared: 7432 case MODshared:
7433 buf->writestring(Token::tochars[TOKshared]); 7433 buf->writestring(Token::tochars[TOKshared]);
7434 break; 7434 break;