-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, map was wrapping KCL values in a JSON object unnecessarily. The new `double_map` test would emit this error: ``` Syntax(KclErrorDetails { source_ranges: [SourceRange([31, 32])], message: "Invalid number: {\"type\":\"UserVal\",\"value\":1.0,\"__meta\":[{\"sourceRange\":[31,36]}]}" }) ``` In other words, the second `map` statement is being passed an array of JSON STRINGS, not an array of numbers. The strings contain JSON stringified representations of user values which are numbers. Bug is now fixed.
- Loading branch information
1 parent
fa527ec
commit 6ebfe59
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn increment = (i) => { return i + 1 } | ||
|
||
xs = [0..2] | ||
ys = xs | ||
|> map(%, increment) | ||
|> map(%, increment) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters