mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
* start correct * Fix #1394 * remove llvm::outs() * Fix #1394 * --- * fix issue-1394 * fix issue-1394 * Update explorer/interpreter/interpreter.cpp Co-authored-by: Geoff Romer <gromer@google.com> * fix issue-1394 * remove and rename test files * add changes from j.m Co-authored-by: m new <michael.burzan@outlook.de> Co-authored-by: Geoff Romer <gromer@google.com>
This commit is contained in:
co-authored by
Geoff Romer
m new
parent
e74c73240c
commit
6cf2272bbe
@@ -799,6 +799,10 @@ auto Interpreter::CallFunction(const CallExpression& call,
|
||||
alt.alt_name(), alt.choice_name(), arg));
|
||||
}
|
||||
case Value::Kind::FunctionValue: {
|
||||
if (phase() == Phase::CompileTime) {
|
||||
return ProgramError(call.source_loc())
|
||||
<< "Function would be called at compile-time";
|
||||
}
|
||||
const FunctionValue& fun_val = cast<FunctionValue>(*fun);
|
||||
const FunctionDeclaration& function = fun_val.declaration();
|
||||
RuntimeScope binding_scope(&heap_);
|
||||
|
||||
Reference in New Issue
Block a user