mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Consider string literals as constant in isConstLiteral.
This commit is contained in:
parent
d852300b1e
commit
557a8bd756
2 changed files with 22 additions and 5 deletions
|
@ -522,6 +522,10 @@ bool isConstLiteral(Expression *e) {
|
|||
}
|
||||
} break;
|
||||
|
||||
// isConst also returns 0 for string literals that are obviously constant.
|
||||
case TOKstring:
|
||||
return true;
|
||||
|
||||
default:
|
||||
if (e->isConst() != 1)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue