Skip to content

Commit

Permalink
Merge pull request #3587 from 9rnsr/fix12642
Browse files Browse the repository at this point in the history
Additional issue 12642 fix for vector literal and @nogc
  • Loading branch information
dnadlinger committed May 26, 2014
2 parents 832e876 + f8c228c commit d060bdb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cast.c
Expand Up @@ -1925,6 +1925,7 @@ Expression *castTo(Expression *e, Scope *sc, Type *t)
goto L1;

ae = (ArrayLiteralExp *)e->copy();
ae->type = tbase; // Bugzilla 12642
ae->elements = e->elements->copy();
Type *telement = tv->elementType();
for (size_t i = 0; i < e->elements->dim; i++)
Expand Down
9 changes: 9 additions & 0 deletions test/compilable/nogc.d
Expand Up @@ -85,3 +85,12 @@ void test12630() @nogc
enum cat2 = (a ~ a).sizeof;
}

/******************************************/
// 12642

import core.simd;

ulong2 test12642() @nogc
{
return [0, 0];
}

0 comments on commit d060bdb

Please sign in to comment.