Skip to content

Commit

Permalink
fix #6179 (née #8828, non-specific error line number)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolta committed Nov 3, 2014
1 parent 2414a86 commit 435d8ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/codegen.cpp
Expand Up @@ -3123,8 +3123,11 @@ static Value *emit_expr(jl_value_t *expr, jl_codectx_t *ctx, bool isboxed,
jl_errorf("macro definition not allowed inside a local scope");
}
else {
jl_errorf("unsupported or misplaced expression \"%s\" in function %s",
head->name, ctx->linfo->name->name);
std::ostringstream err;
err << "unsupported or misplaced expression '" << head->name
<< "' in function '" << ctx->linfo->name->name << "'";
emit_error(err.str(), ctx);
return V_null;
}
}
}
Expand Down

0 comments on commit 435d8ff

Please sign in to comment.