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

serve-d complains when on assignment in conditional expression #228

Closed
vabenil opened this issue Jun 3, 2022 · 6 comments · Fixed by dlang-community/libdparse#462
Closed
Labels

Comments

@vabenil
Copy link

vabenil commented Jun 3, 2022

Description

Serve-d tells me that the code below should result in an Error despite it compiling fine.
2022-06-03_10:55:50

Setup

  • Arch Linux
  • neovim 0.7.0
  • nvim-lspconfig
  • serve-d - latest version as of June 03 2022 (Also tested with stable 7.4v release)

Steps to reproduce

  1. Create a sample project with dub
  2. insert this code in source/app.d
import std : writeln, format;

void main()
{
    int i = 10;
    // Silly example I know
    while (int not_four = (i != 4)) {
        writeln(format("%d is not 4!", i));
        i--;
    }
}
@WebFreak001 WebFreak001 added the bug label Jun 3, 2022
@WebFreak001
Copy link
Member

this actually seems to be new syntax since 2.097.2 that you are allowed to use variable declarations as conditions inside while loops that's not yet supported in libdparse: https://dlang.org/changelog/2.097.0.html#while-condition-assignment

@vabenil
Copy link
Author

vabenil commented Jun 3, 2022

Should I open an issue in libdparse then?

@WebFreak001
Copy link
Member

yes, should be fixed soon too

@WebFreak001
Copy link
Member

(still needs libdparse update here)

@WebFreak001 WebFreak001 reopened this Jun 20, 2022
@vabenil
Copy link
Author

vabenil commented Nov 24, 2022

libdparse has been updated here already. The only thing we are missing is a release. We can close this already, no?

@WebFreak001
Copy link
Member

yep, stable release is in preparation and dependencies are updated as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants