Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] inspect expression cannot initialize a variable #723

Open
ntrel opened this issue Oct 4, 2023 · 1 comment · May be fixed by #765
Open

[BUG] inspect expression cannot initialize a variable #723

ntrel opened this issue Oct 4, 2023 · 1 comment · May be fixed by #765
Labels
bug Something isn't working

Comments

@ntrel
Copy link
Contributor

ntrel commented Oct 4, 2023

To Reproduce

    i := inspect v -> int {
        is _ = 0;
    };

Error:

inspect.cpp2(6,10): error: (temporary alpha limitation) cppfront is still learning 'inspect' - only inspect expressions are currently supported

@ntrel ntrel added the bug Something isn't working label Oct 4, 2023
@JohelEGP
Copy link
Contributor

JohelEGP commented Oct 4, 2023

This is interesting.
That's a declaration statement for i,
and its initializer is a statement.
But unlike a inspect-expression statement,
this one is expected to be non-void to serve as an initializer.

ntrel added a commit to ntrel/cppfront that referenced this issue Oct 20, 2023
ntrel added a commit to ntrel/cppfront that referenced this issue Oct 20, 2023
ntrel added a commit to ntrel/cppfront that referenced this issue Oct 20, 2023
ntrel added a commit to ntrel/cppfront that referenced this issue Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants