carbon-lang icon indicating copy to clipboard operation
carbon-lang copied to clipboard

Bug when typing global variables with "auto"

Open DarshalShetty opened this issue 3 years ago • 6 comments
trafficstars

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;
}

DarshalShetty avatar Feb 23 '22 15:02 DarshalShetty

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.

github-actions[bot] avatar May 25 '22 02:05 github-actions[bot]

On it.

gysddn avatar Aug 06 '22 12:08 gysddn

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.

beryll1um avatar Aug 22 '22 02:08 beryll1um

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. :)

jonmeow avatar Aug 22 '22 15:08 jonmeow

@beryll1um You can work on it. I am unfortunately unable at the moment. So feel free.

gysddn avatar Aug 22 '22 15:08 gysddn

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.

github-actions[bot] avatar Nov 21 '22 02:11 github-actions[bot]

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

chandlerc avatar Jan 20 '24 00:01 chandlerc