-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use the correct type for scatter output. (#316)
- Loading branch information
1 parent
896981f
commit 0fe926f
Showing
6 changed files
with
57 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
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 @@ | ||
{} |
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 @@ | ||
{ | ||
"run.names": [ | ||
"sample_one", | ||
"sample_three" | ||
] | ||
} |
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,40 @@ | ||
## This is a test for https://github.com/stjude-rust-labs/wdl/issues/315 | ||
## This test will output an array rather than emit a diagnostic | ||
version 1.2 | ||
|
||
struct Sample { | ||
String kind | ||
String name | ||
} | ||
|
||
workflow run { | ||
Array[Sample] samples = [ | ||
Sample { | ||
kind: "normal", | ||
name: "sample_one", | ||
}, | ||
Sample { | ||
kind: "tumor", | ||
name: "sample_two", | ||
}, | ||
Sample { | ||
kind: "normal", | ||
name: "sample_three", | ||
}, | ||
Sample { | ||
kind: "tumor", | ||
name: "sample_four", | ||
}, | ||
] | ||
|
||
scatter (sample in samples) { | ||
if (sample.kind == "normal") { | ||
String name = sample.name | ||
} | ||
} | ||
|
||
output { | ||
Array[String] names = select_all(name) | ||
} | ||
} |