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

Spec incorrectly claims that strings are treated as sequences in compound assignment #281

Open
haberman opened this issue Jul 18, 2024 · 2 comments

Comments

@haberman
Copy link

The spec contains this example in assignments:

[(a, b), (c, d)] = ("ab", "cd")

However, this statement is rejected by both Bazel and https://github.com/google/starlark-go

Bazel:

ERROR: Traceback (most recent call last):
	File "/Users/haberman/bazel_workspace/test.bzl", line 27, column 8, in <toplevel>
		print(f())
	File "/Users/haberman/bazel_workspace/test.bzl", line 24, column 20, in f
		[(a, b), (c, d)] = ("ab", "cd")
Error: got 'string' in sequence assignment (want 2-element sequence)

starlark-go:

Traceback (most recent call last):
  test.bzl:27:8: in <toplevel>
  test.bzl:24:20: in f
Error: got string in sequence assignment
@laurentlb
Copy link
Contributor

Thanks, the example looks wrong to me, it should be removed.

@joydeep049
Copy link

Hello!
I would like to contribute.
Can anyone tell me how to get started?

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

No branches or pull requests

3 participants