Unused value in: ab = "a" + "b" #14

Closed
opened 2025-08-17 13:46:33 +00:00 by zupa · 3 comments

I ran into another unused value bug.

Code:

main() {
	ab := "a" + "b"
	assert ab == "ab"
}

Error:

    ab := "a" + "b"
          ┬
          ╰─ Unused value '"a"'
I ran into another unused value bug. Code: ``` main() { ab := "a" + "b" assert ab == "ab" } ``` Error: ``` ab := "a" + "b" ┬ ╰─ Unused value '"a"' ```
Owner

Yea this should be a different type of error. String concatenation currently has no implementation.
I'll make it fail as "Not implemented" instead and later we'll implement the real thing.

Yea this should be a different type of error. String concatenation currently has no implementation. I'll make it fail as "Not implemented" instead and later we'll implement the real thing.
Owner

cli/q@4cb94d758f now shows a proper error message.

Tests that must return the new error to pass:

Let's consider this finished for now and re-open string concatenation as a new feature proposal in the future.

https://git.urbach.dev/cli/q/commit/4cb94d758f39bf33e457e0d70095503b770075f1 now shows a proper error message. Tests that must return the new error to pass: - https://git.urbach.dev/cli/q/src/commit/4cb94d758f39bf33e457e0d70095503b770075f1/src/core/testdata/InvalidStructOperation.q - https://git.urbach.dev/cli/q/src/commit/4cb94d758f39bf33e457e0d70095503b770075f1/src/core/testdata/InvalidStructOperation2.q Let's consider this finished for now and re-open string concatenation as a new feature proposal in the future.
ed added spent time 2025-08-17 16:54:43 +00:00
20 minutes
Author

Makes sense, thanks!

Makes sense, thanks!
zupa closed this issue 2025-08-17 17:24:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 20 minutes
ed
20 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cli/q#14
No description provided.