mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 11:28:31 +00:00
Don't create a compile time binding after CompileTimeBindingInVarDecl (#4463)
Related to #4461, more generally try not to produce a compile-time binding when the code shouldn't be able to do so.
This commit is contained in:
1 parent
57c9a2ed4a
commit
99e96605bf
3 files changed
+12
-22
No files matched your search
@@ -93,6 +93,8 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
CompileTimeBindingInVarDecl, Error,
|
||||
"`var` declaration cannot declare a compile-time binding");
|
||||
context.emitter().Emit(type_node, CompileTimeBindingInVarDecl);
|
||||
// Prevent lambda helpers from creating a compile time binding.
|
||||
needs_compile_time_binding = false;
|
||||
}
|
||||
auto binding_id =
|
||||
is_generic
|
||||
|
||||
Reference in new issue
Block a user