Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

pkg/list: list.Flatten fails on non-final value #268

Closed
rogpeppe opened this issue Jan 22, 2020 · 1 comment
Closed

pkg/list: list.Flatten fails on non-final value #268

rogpeppe opened this issue Jan 22, 2020 · 1 comment

Comments

@rogpeppe
Copy link
Contributor

rogpeppe commented Jan 22, 2020

This cue code:

import "list"
Items :: [... string] | *[]
x: list.FlattenN([Items], -1)

produces:

{
    "x": [
        []
    ]
}

not the expected:

{
    "x": []
}

It seems that the flatten code isn't treating Items as a list.

@cueckoo
Copy link

cueckoo commented Jul 3, 2021

This issue has been migrated to cue-lang/cue#268.

For more details about CUE's migration to a new home, please see cue-lang/cue#1078.

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

No branches or pull requests

2 participants