aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/nogc.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/nogc.d')
-rw-r--r--gcc/d/dmd/nogc.d4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/d/dmd/nogc.d b/gcc/d/dmd/nogc.d
index d6735d4..2957b3a 100644
--- a/gcc/d/dmd/nogc.d
+++ b/gcc/d/dmd/nogc.d
@@ -137,9 +137,9 @@ public:
override void visit(DeleteExp e)
{
- if (e.e1.op == EXP.variable)
+ if (VarExp ve = e.e1.isVarExp())
{
- VarDeclaration v = (cast(VarExp)e.e1).var.isVarDeclaration();
+ VarDeclaration v = ve.var.isVarDeclaration();
if (v && v.onstack)
return; // delete for scope allocated class object
}