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

This commit is contained in:
Geoff Romer authored and GitHub committed 2021-12-10 12:19:06 -08:00
1 parent dcc287cb6e
commit e65e85b15d
5 files changed
+53 -50

No files matched your search

@@ -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);