Permalink
Browse files

CTFE: Fix segfault with x ~ error

  • Loading branch information...
don-clugston-sociomantic committed Apr 24, 2012
1 parent 52c61f1 commit 51d2d9da6207bcc214669e55f14621a71e771d47
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/interpret.c
View
@@ -5679,7 +5679,9 @@ Expression *CatExp::interpret(InterState *istate, CtfeGoal goal)
e2 = resolveSlice(e2);
e = ctfeCat(type, e1, e2);
if (e == EXP_CANT_INTERPRET)
- error("%s cannot be interpreted at compile time", toChars());
+ { error("%s cannot be interpreted at compile time", toChars());
+ return e;
+ }
// We know we still own it, because we interpreted both e1 and e2
if (e->op == TOKarrayliteral)
((ArrayLiteralExp *)e)->ownedByCtfe = true;

0 comments on commit 51d2d9d

Please sign in to comment.