Skip to content

[Sugar Syntax] Pipeline does not work for :pathLabel #2189

@RickBarretto

Description

@RickBarretto

Summary

When I try to assign a pipeline result to a :pathLabel, I get this weird exception. But, when I do this for common :label, this works fine.

Current Behavior


define :Scream [
    init: method [container :block][
        this\xs: container
            | map => upper
    ]

    string: method [][
        join.word this\xs
    ]
]

scream: to :Scream [["hello" "world"]]!
print to :string scream
;
; ══╡ Value Error ╞════════════════════════════════════════════════════════════════════════════ <script> ══
;
;   Not enough parameters
; 
;   Cannot perform:
;       map
;
;   Required:
;       3
;
;   ┃ File: c:\Users\rickd\Documents\Projects\unitt\oop.art
;   ┃ Line: 5
;   ┃
;   ┃    3 ║      init: method [container :block][
;   ┃    4 ║          this\xs: container
;   ┃    5 ║►             | map => upper
;   ┃    6 ║      ]
;   ┃    7 ║
;

Expected Behavior

Working example


define :Scream [
    init: method [container :block][
        xs: container
            | map => upper

        this\xs: xs
    ]

    string: method [][
        join.word this\xs
    ]
]

scream: to :Scream [["hello" "world"]]!
print to :string scream
; => HELLO WORLD

But should work for:


define :Scream [
    init: method [container :block][
        this\xs: container
            | map => upper
    ]

    string: method [][
        join.word this\xs
    ]
]

scream: to :Scream [["hello" "world"]]!
print to :string scream
; => HELLO WORLD

Steps To Reproduce

No response

OS

Windows 11

Version

arturo 0.10.0 Arizona Bark (amd64/windows)

Anything else?

Issue reported from official Arturo's VS Code extension.

  • VS Code: Visual Studio Code 1.109.3 / Extension: v0.9.3

Is there an existing issue for this?

  • I have searched the existing issues

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions