mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:21:05 +01:00
Continue: emit function definitions for specifics. (#5068)
Resolve instruction id depending on the context from which a function is called. Calling a function in a function context that does not have a definition emitted before reaching lowering will cause a crash. This needs a change in check/eval layer.
This commit is contained in:
@@ -21,6 +21,8 @@ auto GetCalleeFunction(const File& sem_ir, InstId callee_id,
|
||||
if (specific_id.has_value()) {
|
||||
callee_id = sem_ir.constant_values().GetInstIdIfValid(
|
||||
GetConstantValueInSpecific(sem_ir, specific_id, callee_id));
|
||||
CARBON_CHECK(callee_id.has_value(),
|
||||
"Invalid callee id in a specific context");
|
||||
}
|
||||
|
||||
if (auto specific_function =
|
||||
|
||||
Reference in New Issue
Block a user