Use AST nodes as generic arg deduction keys (#982)

This commit is contained in:
Geoff Romer
2021-12-10 12:19:06 -08:00
committed by GitHub
parent dcc287cb6e
commit e65e85b15d
5 changed files with 53 additions and 50 deletions
@@ -105,7 +105,7 @@ void Interpreter::InitEnv(const Declaration& d, Env* env) {
for (Nonnull<const GenericBinding*> deduced :
func_def.deduced_parameters()) {
AllocationId a =
heap_.AllocateValue(arena_->New<VariableType>(deduced->name()));
heap_.AllocateValue(arena_->New<VariableType>(deduced));
new_env.Set(deduced->name(), a);
}
Nonnull<const FunctionValue*> f = arena_->New<FunctionValue>(&func_def);