carbon-lang
carbon-lang copied to clipboard
Bug when typing global variables with "auto"
Modifying the init_and_read.carbon test case as follows triggers an internal cast error.
package ExecutableSemanticsTest api;
// Test global variable initialization and read.
var zero: auto = 0;
fn Main() -> i32 {
return zero;
}
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term label can also be added for issues which are expected to take time.
This issue is labeled inactive because the last activity was over 90 days ago.
On it.
AutoPattern is just not supported for TypeCheckDeclaration with DeclarationKind::VariableDeclaration right now. (only ExpressionPattern) as I understand.https://github.com/carbon-language/carbon-lang/blob/8c85fa2744f91ce1dee56c1625625af8ba247c43/explorer/interpreter/type_checker.cpp#L3949-L3955 https://github.com/carbon-language/carbon-lang/blob/8c85fa2744f91ce1dee56c1625625af8ba247c43/explorer/interpreter/type_checker.cpp#L4014-L4017
[@geoffromer, @jonmeow], is implementation planed in scope of another issue, or in team backlog?
@gysddn, Can you report your status? I can try to implement this but don't want to do double work.
I think this is a standalone issue. If you or someone else wants to pick this up, we'd be happy to have the contribution. :)
@beryll1um You can work on it. I am unfortunately unable at the moment. So feel free.
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the inactive label. The long term label can also be added for issues which are expected to take time.
This issue is labeled inactive because the last activity was over 90 days ago.
Closing explorer-specific issues as not-planned for now due to our decision to prioritize working on the toolchain over other implementation work in the near term: https://github.com/carbon-language/carbon-lang/blob/trunk/proposals/p3532.md