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

f-strings do not trim whitespace #6629

Closed
bartv opened this issue Oct 17, 2023 · 1 comment
Closed

f-strings do not trim whitespace #6629

bartv opened this issue Oct 17, 2023 · 1 comment
Assignees
Labels
bug Something isn't working compiler tiny Tiny issues

Comments

@bartv
Copy link
Contributor

bartv commented Oct 17, 2023

The following code does not work:

data = 10
std::print(f"-> { data }")
Error: variable  data  not found (reported in std::print(Format(-> { data })) (./test.cf:5))

The lexer for these strings needs to extract the proper variable names!

@bartv bartv added bug Something isn't working compiler labels Oct 17, 2023
@wouterdb
Copy link
Contributor

Hey team! Please add your planning poker estimate with Zenhub @arnaudsjs @FloLey @Hugo-Inmanta @sanderr

@wouterdb wouterdb added the tiny Tiny issues label Oct 24, 2023
@Hugo-Inmanta Hugo-Inmanta self-assigned this Oct 25, 2023
inmantaci pushed a commit that referenced this issue Nov 8, 2023
…le. (Issue #6629, PR #6679)

# Description

Fix bug in f-strings where surrounding a variable with spaces would result in a variable not found error

closes #6629

# Self Check:

Strike through any lines that are not applicable (`~~line~~`) then check the box

- [ ] Attached issue to pull request
- [ ] Changelog entry
- [ ] Type annotations are present
- [ ] Code is clear and sufficiently documented
- [ ] No (preventable) type errors (check using make mypy or make mypy-diff)
- [ ] Sufficient test cases (reproduces the bug/tests the requested feature)
- [ ] Correct, in line with design
- [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )
- [ ] If this PR fixes a race condition in the test suite, also push the fix to the relevant stable branche(s) (see [test-fixes](https://internal.inmanta.com/development/core/tasks/build-master.html#test-fixes) for more info)
inmantaci pushed a commit that referenced this issue Nov 8, 2023
…le. (Issue #6629, PR #6679)

Pull request opened by the merge tool on behalf of #6679
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler tiny Tiny issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants