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

Lists nested in another lists #320

Closed
tethal opened this issue Dec 29, 2015 · 2 comments
Closed

Lists nested in another lists #320

tethal opened this issue Dec 29, 2015 · 2 comments

Comments

@tethal
Copy link
Contributor

tethal commented Dec 29, 2015

Code

sub f(any a) {
    printf("ARG: %N\n", a);
}

f(("a",));
f(((),));
f(((),()));

Result

ARG: list: (1 element)
  [0]="a"
ARG: <EMPTY LIST>
ARG: list: (2 elements)
  [0]=<EMPTY LIST>
  [1]=<EMPTY LIST>

Expected result:

ARG: list: (1 element)
  [0]="a"
ARG: list: (1 element)
  [0]=<EMPTY LIST>
ARG: list: (2 elements)
  [0]=<EMPTY LIST>
  [1]=<EMPTY LIST>
@tethal tethal added the bug label Dec 29, 2015
@tethal
Copy link
Contributor Author

tethal commented Dec 29, 2015

When this is fixed, please uncomment pushEmptyListToEmptyList and unshiftEmptyListToEmptyList in examples/test/qore/operators/list_ops.qtest

@tethal
Copy link
Contributor Author

tethal commented Feb 3, 2016

Another example (from #480):

$ qore -n -e 'const c = (("a",),); printf("%N\n", c);'
list: (1 element)
  [0]="a"

@tethal tethal changed the title Unable to pass a list with an empty list as an argument Lists nested in another lists Feb 3, 2016
davidnich added a commit that referenced this issue Feb 4, 2016
tethal added a commit that referenced this issue Feb 4, 2016
@tethal tethal added the fixed label Feb 4, 2016
@tethal tethal closed this as completed Feb 4, 2016
@davidnich davidnich added this to the 0.8.12 milestone Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants