mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 08:30:33 +00:00
Type computation tests (#511)
* test of a little type computation * another test and some bug fixes
This commit is contained in:
1 parent
190fab9530
commit
56b47bcfa9
12 files changed
+54
-11
No files matched your search
@@ -333,8 +333,7 @@ auto StructDeclaration::InitGlobals(Env& globals) const -> void {
|
||||
}
|
||||
|
||||
auto FunctionDeclaration::InitGlobals(Env& globals) const -> void {
|
||||
Env values;
|
||||
auto pt = InterpExp(values, definition->param_pattern);
|
||||
auto pt = InterpExp(globals, definition->param_pattern);
|
||||
auto f = Value::MakeFunVal(definition->name, pt, definition->body);
|
||||
Address a = state->heap.AllocateValue(f);
|
||||
globals.Set(definition->name, a);
|
||||
|
||||
Reference in new issue
Block a user