Skip to content

Commit

Permalink
CTFE: one extra case of bug 4910
Browse files Browse the repository at this point in the history
Passing a non-var as a ref parameter shouldn't invalidate later calls.
  • Loading branch information
Don Clugston committed May 17, 2011
1 parent 23cd285 commit f7627f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interpret.c
Expand Up @@ -244,7 +244,8 @@ Expression *FuncDeclaration::interpret(InterState *istate, Expressions *argument
VarExp *ve = (VarExp *)earg;
VarDeclaration *v2 = ve->var->isVarDeclaration();
if (!v2)
{ cantInterpret = 1;
{
error("cannot interpret %s as a ref parameter", ve->toChars());
return NULL;
}
v->setValueWithoutChecking(earg);
Expand Down

0 comments on commit f7627f6

Please sign in to comment.