mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 19:41:07 +01:00
Remove FunctionDefinition's default constructor (#735)
This opens up a path for switching `int line_num` to a `Location loc`, which I want to do for tracking filenames of code. But I don't think we should have a default constructor on `Location` to avoid mistakes, and switching FunctionDefinition to an arena alloc seems more consistent anyways.
This commit is contained in:
@@ -978,7 +978,7 @@ auto MakeTypeChecked(const Declaration& d, const TypeEnv& types,
|
||||
const Env& values) -> const Declaration* {
|
||||
switch (d.Tag()) {
|
||||
case Declaration::Kind::FunctionDeclaration:
|
||||
return global_arena->New<FunctionDeclaration>(*TypeCheckFunDef(
|
||||
return global_arena->New<FunctionDeclaration>(TypeCheckFunDef(
|
||||
&cast<FunctionDeclaration>(d).Definition(), types, values));
|
||||
|
||||
case Declaration::Kind::StructDeclaration: {
|
||||
|
||||
Reference in New Issue
Block a user