Skip to content

Named parameters used as positional for builtins #385

Description

@sbarzowski

This works:

std.makeArray(func=function(i) i, sz=5)

But this does not work:

std.makeArray(sz=5, func=function(i) i)

Error:

RUNTIME ERROR: Builtin function makeArray expected (number, function) but got (function, number)
        testdata/std.makeArrayNamed2.jsonnet:1:1-39

The names are checked, but then arguments are treated as positional anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions