Skip to content

Bug when running expressions where a variable can be either an array or array of arrays. #819

@mambla

Description

@mambla

The following expression should print 1. instead it returns an error

let a = [1];
let b = type(a[0]) == 'array' ? a : [a];
b[0][0]

Another example:

let range = [1,1000];
let arr = false ? range : [range];
map(arr, {len(#)})

On the other hand, this works:

let range = [1,1000];
let arr = false ? 5 : [range];
map(arr, {len(#)})

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions